mesonbuild / mesonbuild/meson

Meson cannot reconfigure if transitive wrapped dependencies are stored in a custom subproject_dir

Open
#11,596 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

**Describe the bug**

Suppose a

```meson
project('test', 'c', subproject_dir: 'deps')

x = dependency('x')
```

and a transitively wrapped dependency `y` coming from `deps/x/`:

```meson
project('x', 'c', subproject_dir: 'deps')

y = dependency('y')
```

A `meson setup build --wipe` is enough to cause Meson to fail reconfiguration with:

https://github.com/mesonbuild/meson/blob/b85ffbacb12701382da3404c9bd5aaf56e2c883f/mesonbuild/wrap/wrap.py#L190-L191

because the `subproject_dir` is never forwarded appropriately.

**To Reproduce**

https://github.com/amyspark/mesonbug-wrap-dependency

**Expected behavior**

Reconfiguration to succeed.

**system parameters**
* Is this a [cross build](https://mesonbuild.com/Cross-compilation.html) or just a plain native build (for the same computer)? **Native**
* what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) **Windows 10 21H2**
* what Python version are you using e.g. 3.8.0 **3.10.7**
* what `meson --version` **1.0.1**
* what `ninja --version` if it's a Ninja build **1.10.2.git.kitware.jobserver-1**

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the linked mesonbug-wrap-dependency project using `meson setup build --wipe`. Inspect mesonbuild/wrap/wrap.py at the linked lines and trace how `subproject_dir` is passed through the transitive wrapped dependency. Done means reconfiguration succeeds for the custom `deps` layout without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.