Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Subproject_dir must not contain a path segment" in master breaks projects #2719

Closed
ximion opened this issue Dec 1, 2017 · 4 comments
Closed

Comments

@ximion
Copy link
Contributor

ximion commented Dec 1, 2017

Hi!
The new check introduced in c178a57 breaks existing projects which place their subprojects' wrap files in project subdirectories, e.g. contrib/subprojects.
I've seen this quite often and actually used that particular path myself (why create another toplevel directory if there already is a directory dedicated for similar stuff?).

While I agree that paths like ../dummy in there are awful, I think disallowing putting the files in any subdirectory is a bit aggressive. Can the check be relaxed to only check for the "is an absolute path used" and "is a relative path used that goes beyond the source_root" cases, or is there an obvious bug in using a level-2-subdirectory in source_root?

@ximion
Copy link
Contributor Author

ximion commented Dec 1, 2017

I just now was debugging an issue someone found in the Vibe.d project when compiling it with Meson (see vibe-d/vibe.d#1983 (comment) for reference).
The Vibe.d project uses lib/subprojects/ as its wrapfile directory, and compiles fine with Meson 0.42.x. When upgrading to Meson 0.43.x that apparently broke with the worst possible error message (stating a wrong cause). Upon moving the subprojects dir to the project's toplevel directory, everything started to work again.

So, I guess there is definitely some issue here with using a nested subproject directory, but this issue was only introduced with Meson 0.43 and isn't present in prior versions.

@ximion
Copy link
Contributor Author

ximion commented Jan 7, 2018

Any news on this one? I would really like to know what the course of action is (I can't even submit a patch without knowing what the Meson maintainers would like to do).
This is also blocking updates to newer Meson versions in a couple of projects, and it's one of the bugs keeping Meson from being updated in Debian testing.

@jpakkane
Copy link
Member

jpakkane commented Jan 7, 2018

I guess we can change the check to ensure that there are no .. segments in the directory name.

@ximion
Copy link
Contributor Author

ximion commented Jan 7, 2018

That would work for me, and also ensure the subproject dir stays in the project's source tree and not some random location. So, check that subprojects_dir is not an absolute path and contains no .. would definitely resolve this for 99.9% of all people (and the rest should fix their Meson file).

nirbheek pushed a commit that referenced this issue Feb 18, 2018
The previous change disallowed any subdirectories for subproject dirs,
and therefore broke a couple of projects making use of that.
This change still prevents people from setting subproject dirs that are
not in the project's source tree, while allowing to specify any path
within the project's directory again.

Resolves: #2719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants