-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow subproject dirs in subdirectories in the source tree again #2890
Conversation
This should also have these:
|
And path absoluteness should be checked with |
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
I was actually wondering why |
The |
This is important so people can not trick Meson to select a subproject_dir that is not in the project's source directory. It also ensures a string is used for the path.
Eeek, yes, I didn't think of that (and though that section was already in there). |
if spdirname.startswith('.'): | ||
raise InterpreterException('Subproject_dir must not begin with a period.') | ||
if '..' in spdirname: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: please use pathlib.PurePath().parts
so that names like subprojects/some..dir/
don't fail this test.
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.
This fixes the regression described in #2719