Open WillAyd opened 1 month ago
I cannot reproduce with 1.4.1 or 1.5.2. Is this not on Linux?
Also, your symlink doesn't point to the top-level directory, but goes one above it and assumes the name of the top-level directory; could you perhaps have renamed it after making the symlink?
Oh, actually, you didn't provide a .wrap
in the MRE, so it wouldn't have attempted it.
Ah sorry...missed pushing that. Should be there now
Ah, the problem is your wrap file says that the directory is meson-subproject-mre-$COMMIT_HASH
, which isn't there, so Meson downloads it. I'm not sure if there's any documentation stating that the wrap file gets priority over a similarly named directory.
For now, you could get it to work by renaming the symlink a bit, and doing:
subproject = subproject('meson-subproject-mre-symlink', required: false)
if not subproject.found()
subproject = subproject('meson-subproject-mre') # Use wrap file.
endif
Ah, the problem is your wrap file says that the directory is
meson-subproject-mre-$COMMIT_HASH
, which isn't there, so Meson downloads it.
Oh OK - in this particular case I can just change that to remove the $COMMIT_HASH then too and it should work right? Seems to from a local test.
I was following that pattern since I've seen that in the wrapdb for many packages, assumedly to avoid a conflict of versions.
You could, but then you'd have to use a download URL from GitHub that doesn't include the commit hash in the resulting directory.
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:
In the "python" subdirectory, I've created a separate project that should refer to the "main" project:
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:
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 systemsystem parameters meson 1.5.2