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

Add autosync-before-run, --sync and --no-sync arguments to rye test and rye run (OneOffLock sync mode) #1006

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

khvn26
Copy link

@khvn26 khvn26 commented Apr 9, 2024

This PR adds:

  • --sync/--no-sync flag arguments to run and test commands. They control whether Rye should install project dependencies prior to executing either command.
  • sync-before-run global configuration flag that controls the same thing.

Note that this PR adds a special OneOffLock sync mode that explicitly skips the locking step during sync if target lock file is present. I did this as I felt the implicit "no update" flag passed to locking backends in Regular mode wasn't a strong enough guarantee that the lock files won't be updated.

Reject in favour of #1005 if you feel this is an overkill.

Closes #886.

@khvn26 khvn26 changed the title Add autosync-before-run, --sync and --no-sync arguments to test (OneOff sync mode) Add autosync-before-run, --sync and --no-sync arguments to rye test and rye run (OneOff sync mode) Apr 9, 2024
@khvn26 khvn26 changed the title Add autosync-before-run, --sync and --no-sync arguments to rye test and rye run (OneOff sync mode) Add autosync-before-run, --sync and --no-sync arguments to rye test and rye run (OneOffLock sync mode) Apr 11, 2024
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

Successfully merging this pull request may close these issues.

Add autosync(and --sync/--no-sync ) to rye run
1 participant