-
Notifications
You must be signed in to change notification settings - Fork 7
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
Testenv virtual environments are always recreated even if dependencies have not changed #18
Comments
For the moment this is actually an intentional design choice. I'm not yet sure what the best way to tell when the lockfile has changed is. Since the plugin can't accurately detect dependency changes in the lockfile the safest option is to always reinstall all dependencies for an environment just in case. That said, this is a pretty serious efficiency hit. I'm still thinking about what the best way to tackle this is. Any suggestions/input would definitely be appreciated! |
@enpaul Since This is a bigger issue for So this plugin would be no worse than the status quo if it leaves it to the user. I personally think allowing the user to make the choice would be best. You could add documentation about setting # For users that want to always recreate to ensure test envs are in sync with poetry.lock at the cost
# of always having to wait for the envs to be recreated
[testenv]
# Inherited to all testenvs
recreate = true
require_locked_deps = true |
Did some research on this, and I think it's going to require the addition of a new hook implementation, specifically That said, I need to understand better how tox figures out whether a venv has changed before I go down this path. I believe this is the critical spot where this is done. |
@enpaul Just wanted to say our team updated to 0.5.0 and everything is running great! You've solved all of the issues we were running into and everything runs smoothly. Thanks! |
@johnthagen Awesome! Glad to hear it's working well for you guys, and thank you for all your suggestions and feedback on this project! |
The envs are recreated each time, which causes subsequent runs to be just as slow as the initial run, rather than skipping installation as is typical with
tox
. This makes it difficult to use in apre-commit
situation, due to how long the delay is beforetox
commands complete.With
require_locked_deps = true
:When set to
false
:Config
poetry.lock
The text was updated successfully, but these errors were encountered: