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

Support optional packages #2457

Open
itsdalmo opened this issue Dec 17, 2024 · 1 comment
Open

Support optional packages #2457

itsdalmo opened this issue Dec 17, 2024 · 1 comment
Labels
feature New feature or request triage Issue needs triage

Comments

@itsdalmo
Copy link

itsdalmo commented Dec 17, 2024

What problem are you trying to solve?

I'm using devbox and direnv to encapsulate my development environment, and using the devbox-install-action and direnv to set replicate the environment for tests in Github actions also. This has been working great, however my Github actions steps are installing a lot of dev dependencies that are not needed by the CI, and restoring the cache with all this bloat is slowing down Github actions.

What solution would you like?

I wanted to include: another devbox.json file the way we can include a plugin right now, so that I could compose devbox configs. However, fundamentally this is just a feature request to be able to specify optional packages, so that certain packages don't get installed in my CI jobs.

Alternatives you've considered

I tried to create two files:

  • devbox.ci.json (i.e. the minimal dependencies for running our tests)
  • devbox.json (full development environment)

Then I tried to include: the devbox.ci.json in the other, and discovered that include was reserved for plugins. I then tried to create a subfolder devbox/ci/plugin.json and using that as the include in both devbox.ci.json (otherwise empty) and devbox.json, however I ran into a couple of problems:

  1. When I use devbox shell --config devbox.ci.json it updates the devbox.lock (not devbox.ci.lock).
  2. I have a path:./my/flake#bin in my plugin.json is now relative to the devbox.json file that includes it, and not the plugin itself, which means I can't move one of the devbox.json files to a separate directory.
@itsdalmo itsdalmo added feature New feature or request triage Issue needs triage labels Dec 17, 2024
@aaomidi
Copy link

aaomidi commented Jan 21, 2025

I agree with this being necessary. Just restoring our pretty reasonable sized devbox file takes ~40 seconds (and its just disk speed at this point, not network speed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Issue needs triage
Development

No branches or pull requests

2 participants