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

make smuggled package cache values insensitive to argument order & short/long form #42

Open
paxtonfitzpatrick opened this issue Jul 12, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@paxtonfitzpatrick
Copy link
Member

When the same smuggle command is multiple times in the same interpreter session, davos avoids re-checking the file system for a local, satisfactory package version, unless something about the command has been changed since it was last run (e.g., the requested version, installer program, VCS URL, etc.). This is done by storing a dict item for each smuggled package in davos.config.smuggled, where the key is the package name and the value is a string made by ';'.join()ing the name of the installer program and all arguments supplied in the onion comment (no onion comment results in just <installer_name>;).

This is quick and simple, but ideally it would treat variations in argument order & short/long form as matches.

i.e., running:

smuggle foo    # pip: -v foo==0.0.1

stores:

davos.config.smuggled['foo'] = 'pip;-v;foo==0.0.1'

However, neither of the following would be recognized as previously run, despite being equivalent to the existing cached value:

smuggle foo    # pip: foo==0.0.1 -v           # new value would be 'pip;foo==0.0.1;-v'

smuggle foo    # pip: --verbose foo==0.0.1    # new value would be 'pip;--verbose;foo==0.0.1'
@paxtonfitzpatrick paxtonfitzpatrick added the enhancement New feature or request label Jul 12, 2021
@paxtonfitzpatrick
Copy link
Member Author

it should also resolve relative paths so they're considered the same as absolute paths, though this might be better done in either davos.core.core.Onion.parse_onion() or davos.core.core.parse_line()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant