Open andykais opened 2 months ago
found another one that continually re-downloads and does not have to do with --check
:
deno install -A --unstable-ffi -n forager-cli jsr:@forager/cli@0.4.6
$ forager-cli
Download https://jsr.io/@forager/web/0.0.10/server/entries/pages/tailwindcss/resolveConfig.js
This is the import it is redownloading: https://jsr.io/@forager/web/0.0.10/server/entries/pages/_page.svelte.js#L3
and I suppose its redownloading because the import is dynamic here https://jsr.io/@forager/web/0.0.10/server/nodes/2.js#L5. I dont have a lot of control over how sveltekit compiles these files :disappointed:. I'm not sure if this is expected behavior or if deno should be caching dynamic imports after the first run. Figured I would bubble this one up here though
Version: Deno 1.46.2
repro steps
install the script
deno install --global --allow-run=ffprobe,ffmpeg --unstable-ffi --check --allow-read --allow-write --allow-ffi --allow-env=DENO_SQLITE_LOCAL,DENO_SQLITE_PATH,HOME,DENO_DIR,XDG_CACHE_HOME --allow-net --name forager-cli --force jsr:@forager/cli@0.4.2
then run the following
forager-cli 2>&1 | tee output.txt
This will show
on every run. This output appears to go away when I remove the
--check
flag from the install command:deno install --global --allow-run=ffprobe,ffmpeg --unstable-ffi --check --allow-read --allow-write --allow-ffi --allow-env=DENO_SQLITE_LOCAL,DENO_SQLITE_PATH,HOME,DENO_DIR,XDG_CACHE_HOME --allow-net --name forager-cli --force jsr:@forager/cli@0.4.2
I believe this is because the script compiles with typing references that are non-existent https://jsr.io/@forager/web/0.0.6/server.js#L40972
I think this is possibly something I can fix with my build system to strip out these bad typing references (this is an autogenerated file deep inside my library, so typing isnt really important). It does feel like there is a deno bug if it continually tries to download a non existent dependency and fails to warn about that anywhere. Also more generally, I don't like that I have control over when my script reaches out to the internet (
--allow-net
) but I have no control over when deno reaches out to the internet. There isDENO_NO_UPDATE_CHECK
, anddeno cache ...
but that is different than a kind ofDENO_NO_NET
env var or some such field that I can turn on when I want to avoid any network traffic from deno