jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.84k stars 188 forks source link

Feature Request: Designate Dev-Dependencies in devbox.json #2067

Open ibrhmkoz opened 1 month ago

ibrhmkoz commented 1 month ago

What problem are you trying to solve?

I'm using Devbox to provision development environments, and I've noticed a potential enhancement. It would be beneficial if devbox.json allowed us to designate which dependencies are development dependencies, similar to how npm handles devDependencies. This feature would enable the installation of post-build dependencies and ensure parity between the development and runtime environments using the Devbox package manager.

What solution would you like?

To avoid breaking changes, new clients can specify the distinction between development and runtime dependencies as follows, while keeping the old configuration intact:

{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.5/.schema/devbox.schema.json",
  "devPackages": [
    "go@latest",
    "sqlc@latest",
    "atlas@latest",
    "git-crypt@latest",
    "protobuf@latest",
    "protoc-gen-go@latest",
    "protoc-gen-go-grpc@latest",
    "docker-compose@latest",
    "git@latest",
    "docker@latest",
    "gnumake@latest"
  ],
  "runtimePackages": [
    "python@latest"
  ]
}

New CLI Commands:

devbox install runtime: Installs only runtime dependencies. devbox install: Installs all dependencies (both development and runtime).

Alternatives you've considered

No response

apgrucza commented 6 days ago

This is similar to #1227. In there I have a proposal that isn't limited to just two environments (i.e. dev and runtime).