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

Artifact downloads limited by max-jobs #73

Open
bendlas opened this issue Jul 20, 2023 · 4 comments
Open

Artifact downloads limited by max-jobs #73

bendlas opened this issue Jul 20, 2023 · 4 comments

Comments

@bendlas
Copy link
Contributor

bendlas commented Jul 20, 2023

When the jar and pom files for a classpath are not in /nix/store, the resulting downloads are treated as regular builds and can be very slow if max-jobs is low.

This is essentially the same problem nix-community/yarn2nix#9 (comment)

Possible workarounds

  • A command that pre-builds just the classpath and adds --option max-jobs 256
  • Maybe builtins.fetchurl wouldcount against http-downloads?
@jlesquembre
Copy link
Owner

A command that pre-builds just the classpath and adds --option max-jobs 256

That's for sure an option. Is your use case to speed up CI builds?

If not on CI, there is an option to add the dependencies to the nix store when you generate the lock file, search for CLJNIX_ADD_NIX_STORE in the README:

CLJNIX_ADD_NIX_STORE=true nix run github:jlesquembre/clj-nix#deps-lock

Probably I should add a flag to the CLI to do that.

@bendlas
Copy link
Contributor Author

bendlas commented Jul 23, 2023

That's for sure an option. Is your use case to speed up CI builds?

Yes, also

  • first-time user: time to command
  • existing user: checking out older versions after gc

Probably I should add a flag to the CLI to do that.

Interesting, a flag to just transfer to nix store - without updating any versions - would also solve these cases, right?

@jlesquembre
Copy link
Owner

@bendlas to clarify it, a new CLI command, like

add-clj-deps deps-lock.json

which adds all the dependencies to the nix store, solves your use case, right?

@bendlas
Copy link
Contributor Author

bendlas commented Jul 24, 2023

Yes, a cli command like preload-deps to fast-track all the dependency downloads would solve my use cases neatly.

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

No branches or pull requests

2 participants