You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run deno cache --lock deps.ts, the lockfile is checked, but never written to, as specified by deno cache --help:
~/Development/warden.nvim => deno cache --help | grep lock
--lock [<FILE>]
Check the specified lock file.
If value is not provided, defaults to "deno.lock" in the current working directory.
--lock-write
Force overwriting the lock file.
If the lockfile does not check, the command exits with code 1, otherwise 0.
Two things imply the expected behavior:
The existence of --lock-write (why does --lock-write exist if --lock also writes?)
The documentation saying that lock "Check(s) the specified lock file" (checking does not imply writing)
Actual behavior
Running deno cache --lock deps.ts actually writes to the lockfile if the dependencies have changed
It works differently from --lock-write: it appends to the entries, whereas --lock-write rewrites the file completely
Here is an example resulting diff from running deno cache --lock deps.ts in my project after changing the version of a dependency (I did not add a new dependency):
I can"t use deno cache --lock deps.ts as a way to check in CI or in a pre-commit hook whether my dependencies are still resolving to the same thing
The behavior of appending to the lockfile when a dependency changes its version is undefined as far as the documentation (and deno cache --help) indicates
The text was updated successfully, but these errors were encountered:
This is expected. Deno"s going to have a --frozen-lockfile flag/config option in the future to get the behaviour, if I understand correctly, you"ve described.
Expected behavior
When I run
deno cache --lock deps.ts
, the lockfile is checked, but never written to, as specified bydeno cache --help
:If the lockfile does not check, the command exits with code
1
, otherwise0
.Two things imply the expected behavior:
--lock-write
(why does--lock-write
exist if--lock
also writes?)Actual behavior
deno cache --lock deps.ts
actually writes to the lockfile if the dependencies have changed--lock-write
: it appends to the entries, whereas--lock-write
rewrites the file completelyHere is an example resulting diff from running
deno cache --lock deps.ts
in my project after changing the version of a dependency (I did not add a new dependency):Screencast.from.2024-02-22.13-24-49.webm
Why is this a problem
deno cache --lock deps.ts
as a way to check in CI or in a pre-commit hook whether my dependencies are still resolving to the same thingdeno cache --help
) indicatesThe text was updated successfully, but these errors were encountered: