mesonbuild / mesonbuild/meson

Meson dist includes wrap-redirect files from local dependency

Open
#14,520 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dist
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

Describe the bug
I am working on a multi-language project with a layout like:

c/
  meson.build
python/
  adbc_driver_manager/
    meson.build
    subprojects 

In my Python configuration, I have something that will look for a system dependency of adbc-driver-manager (assumedly to be used by end users) but that will fall back to a local subproject for "at source" development:

adbc_driver_manager_dep = dependency(
    'adbc-driver-manager',
    fallback: ['arrow-adbc', 'adbc_driver_manager_dep'],
    default_options: ['driver_manager=enabled'],
)

I am also creating a symlink in the Python project to resolve to the "c" project:

python/
  adbc_driver_manager/
    subprojects/
      arrow-adbc/ -- > symlinks to c/

This works great for local development, but Meson automatically generates wrap files for transitive dependencies exposed by the arrow-adbc subproject. For example, the subproject relies on the fmt library, so I end up with a file subprojects/fmt.wrap that looks like:

[wrap-redirect]
filename = arrow-adbc/subprojects/fmt.wrap

This is problematic when I then run meson dist; the arrow-adbc symlinked directory is not included (which I believe is desired), but the auto-generated wrap-redirect files that point to files through that symlink are included with the dist

To Reproduce
See above

Expected behavior
Wrap files that are auto-generated from subprojects should not be included by default as part of the meson dist command

system parameters

  • Is this a cross build or just a plain native build (for the same computer)? Plain
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) Ubuntu 24.04
  • what Python version are you using e.g. 3.8.0 3.13.1
  • what meson --version 1.7.0
  • what ninja --version if it's a Ninja build 1.12.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the layout described in the issue with Meson 1.7.0, run meson dist, and inspect the generated archive alongside subprojects/fmt.wrap. Trace how the [wrap-redirect] file is generated and selected for distribution; done means auto-generated redirects from the symlinked dependency are excluded by default without excluding user-provided wrap files.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.