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

fix(install): cache all exports of JSR packages listed in deno.json #26501

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

nathanwhit
Copy link
Member

Fixes #26498.

This was a sort of intentional decision originally, as I wanted to avoid caching extra files that may not be needed. It seems like that behavior is unintuitive, so I propose we cache all of the exports of listed jsr packages when you run a bare deno install.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I wonder if there's a way someone could express in their deno.json to only cache certain exports or for package authors to say "don't cache this export by default, require an explicit opt-in"

@BlackAsLight
Copy link

LGTM, but I wonder if there's a way someone could express in their deno.json to only cache certain exports or for package authors to say "don't cache this export by default, require an explicit opt-in"

Wouldn't the user only be caching the dependencies actually used in the code of an imported library and not everything in their deno.json or jsr.json?

If somebody forked a lib and wanted to only cache the dependencies used in the code, they could do deno install --entrypoint <mod.ts>. But it makes sense that doing deno install caches literally every dependency listed in the import map.

@dsherret
Copy link
Member

Good point! I forgot about that.

@nathanwhit nathanwhit merged commit 6d587cb into denoland:main Oct 24, 2024
17 checks passed
@nathanwhit nathanwhit deleted the install-all-jsr-exports branch October 24, 2024 03:12
bartlomieju pushed a commit that referenced this pull request Oct 25, 2024
…#26501)

Fixes #26498.

This was a sort of intentional decision originally, as I wanted to avoid
caching extra files that may not be needed. It seems like that behavior
is unintuitive, so I propose we cache all of the exports of listed jsr
packages when you run a bare `deno install`.
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.

deno install doesn't cache all JSR package exports
3 participants