rye icon indicating copy to clipboard operation
rye copied to clipboard

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

Open khvn26 opened this issue 1 year ago • 0 comments

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 avatar Apr 09 '24 17:04 khvn26