Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

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

Open
khvn26 wants to merge 5 commits intoastral-sh:mainfrom
khvn26:feat/cli-test-autosync
Open

Add autosync-before-run, --sync and --no-sync arguments to rye test and rye run (OneOffLock sync mode)#1006
khvn26 wants to merge 5 commits intoastral-sh:mainfrom
khvn26:feat/cli-test-autosync

Conversation

@khvn26
Copy link
Copy Markdown

@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 force-pushed the feat/cli-test-autosync branch from 802171a to a575b00 Compare April 11, 2024 09:53
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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