Open inclyc opened 2 months ago
Should this feature be implemented as a "code action" that requires manual triggering? The files to be downloaded may be quite large.
Should this feature be implemented as a "code action" that requires manual triggering? The files to be downloaded may be quite large.
Yes. I'd like to do this in Code Lens, with workspace/executeCommand
@MangoIV https://github.com/nix-community/nixd/issues/536#issue-2375239352
offer to augment the passed attribute set with the hash computed from prefetching it.
Note that things like fetchFromGithub
are actually FODs, not just "fetchers", and require some evaluation.
I'm currently on design-review about how to balance between evaluation and fetching by idioms.
I also searched nixpkgs and see there are quite some expressions like:
fetchFromGitHub {
rev = "v${version}";
}
And thus "version" needs to be evaluated. And...
finalAttrs.version
may needs some cross-file analysis.
Provide URL prefetchers. Automatically fill hash section.