-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Fix poetry_requirements: ignore internal projects. #12280
Fix poetry_requirements: ignore internal projects. #12280
Conversation
Move to parse state storage from ParseContext to parser where it belongs. This cleans up the conceptual model a bit and allows for typing without untoward dependencies. # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Previously dependencies with paths were assumed to be non-Pants controlled projects and the resulting requirements were not generate with absolute file URLs. Fix both issues by assuming all paths that point to directories inside the build root are Pants controlled projects and treating the rest as absolute file URL requirements. Fixes pantsbuild#12272 [ci skip-rust] [ci skip-build-wheels]
Obviously |
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
Thank you!
"""Determine if the given path represents a non-Pants controlled project. | ||
|
||
If the path points to a file, it's assumed the file is a distribution ( a wheel or sdist) | ||
and the absolute path of that file is returned. | ||
|
||
If the path points to a directory and that directory is outside of the build root, it's | ||
assumed the directory is the root of a buildable Python project (i.e.: it contains a | ||
pyproject.toml or setup.py) and the absolute path of the project is returned. | ||
|
||
Otherwise, `None` is returned since the directory lies inside the build root and is assumed | ||
to be a Pants controlled project. | ||
""" |
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.
The resolution of filesystem paths makes this more susceptible to #7022, but I don't see a good way to resolve that without resolving the underlying issue.
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.
Thanks, John. This looks great.
…omit-local-project-dependencies
# Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Previously dependencies with paths were assumed to be non-Pants controlled projects and the resulting requirements were not generated with absolute file URLs. Fix both issues by assuming all paths that point to directories inside the build root are Pants controlled projects and treating the rest as absolute file URL requirements. Fixes pantsbuild#12272 [ci skip-rust] [ci skip-build-wheels]
Previously dependencies with paths were assumed to be non-Pants
controlled projects and the resulting requirements were not generated
with absolute file URLs. Fix both issues by assuming all paths that
point to directories inside the build root are Pants controlled
projects and treating the rest as absolute file URL requirements.
Fixes #12272
[ci skip-rust]
[ci skip-build-wheels]