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

fix: handle cyclical -rs in requirements.txt files #193

Merged
merged 1 commit into from May 4, 2023

Conversation

G-Rath
Copy link
Owner

@G-Rath G-Rath commented May 4, 2023

Note that this is not actually supported by pip itself, but doing so actually optimizes the parser
a bit anyway by only reading each file exactly once regardless of how often it is required

Note that this is not actually supported by `pip` itself, but doing so actually optimizes the parser
 a bit anyway by only reading each file exactly once regardless of how often it is required
@G-Rath G-Rath added the bug Something isn't working label May 4, 2023
filepath.Join(filepath.Dir(pathToLockfile), strings.TrimPrefix(line, "-r ")),
)
if ar := strings.TrimPrefix(line, "-r "); ar != line {
ar = filepath.Join(filepath.Dir(pathToLockfile), ar)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some path expansion/resolution that that would deal with e.g. ./../pip/cyclic-r-complex-1.txt is the same as ./../pip/../pip/cyclic-r-complex-1.txt

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that's handled by filepath.Join which Cleans the path after the join

@G-Rath G-Rath merged commit f3bdb10 into main May 4, 2023
8 checks passed
@G-Rath G-Rath deleted the handle-cyclic-requires branch May 4, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants