Skip to content

Wrap Entry Supersedes Presence of symlinked subproject #13746

@WillAyd

Description

@WillAyd

Describe the bug
When a project is symlinked into the subdirectory alongside a wrap file with the same name, Meson appears to ignore the symlinked subproject and proceed to using the wrap file entry

To Reproduce
I've created an MRE at this location - https://github.com/WillAyd/meson-subproject-mre

The "main" project looks like:

project(
    'meson-subproject-mre',
    'c',
)

foo_lib = library('foo', 'foo.c')
foo_dep = declare_dependency(link_with: foo_lib)

In the "python" subdirectory, I've created a separate project that should refer to the "main" project:

project(
    'meson-subproject-mre',
    'c'
)

subproject = subproject('meson-subproject-mre')
foo_dep = subproject.get_variable('foo_dep')

Within the subprojects directory of the python directory, I have symlinked to the project root. However, I've additionally provided a meson-subproject-mre.wrap file in case that symlink does not work (ex: when installing from a Python sdist)

If you check out that project, then run:

cd python
meson setup builddir
meson compile -C builddir

You will see that meson downloads meson-subproject-mre from the wrap file, rather than resolving the project via the symlink

Expected behavior
Calls to subproject('meson-subproject-mre') should resolve through the symlink, rather than through the wrap system

system parameters
meson 1.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions