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

Directory within subproject cannot share name with subprojects dir #13774

Open
Ericson2314 opened this issue Oct 10, 2024 · 0 comments
Open

Directory within subproject cannot share name with subprojects dir #13774

Ericson2314 opened this issue Oct 10, 2024 · 0 comments

Comments

@Ericson2314
Copy link
Member

Describe the bug

Suppose my subprojects dir is foo

Suppose one of my subprojects has a dir called foo, e.g. I have something like foo/subproject-a/bar/foo

This should be fine, but it isn't because this code

if subproject_dir == norm or subproject_dir in norm.parents:
raise InterpreterException(f'Sandbox violation: Tried to grab {inputtype} {norm.name} from a nested subproject.')

just looks for any directory name in the path matching the subproject dir name

To Reproduce

We were getting this with Nix, but I have not yet minimized it.

Expected behavior

We should not get confused by names, the sandboxing check should allow this.

system parameters

  • Is this a cross build or just a plain native build (for the same computer)?
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.)
  • what Python version are you using e.g. 3.8.0
  • what meson --version
  • what ninja --version if it's a Ninja build
Ericson2314 added a commit to obsidiansystems/nix that referenced this issue Oct 10, 2024
This is needed to avoid this
mesonbuild/meson#13774 when we go back to
making our subproject directory `src`.
Ericson2314 added a commit to obsidiansystems/nix that referenced this issue Oct 10, 2024
We got rid of this in c7ec336 because
of bug mesonbuild/meson#13774, but in the
previous commit we renamed the manual source directory, which avoids it.
Now we can change it back.
Ericson2314 added a commit to obsidiansystems/nix that referenced this issue Oct 14, 2024
This is needed to avoid this
mesonbuild/meson#13774 when we go back to
making our subproject directory `src`.
Ericson2314 added a commit to obsidiansystems/nix that referenced this issue Oct 14, 2024
We got rid of this in c7ec336 because
of bug mesonbuild/meson#13774, but in the
previous commit we renamed the manual source directory, which avoids it.
Now we can change it back.
Ericson2314 added a commit to obsidiansystems/nix that referenced this issue Oct 16, 2024
This is needed to avoid this
mesonbuild/meson#13774 when we go back to
making our subproject directory `src`.

(cherry picked from commit eb7d778)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant