jetify-com / devbox

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

[Bug]: Spurious warnings about packages in legacy format #1205

Closed mdwn closed 1 year ago

mdwn commented 1 year ago

Current Behavior (bug) When starting devbox shell in 0.5.5, I get spurious warnings about the legacy package format:

➜  teleport git:(mike.wilson/update-go-in-devbox) ✗ devbox shell
Warning: Your devbox.json contains packages in legacy format. Please run `devbox update` to update your devbox.json.
Starting a devbox shell...

The issue there is that the packages I've got in the legacy format are intentional, as they do not yet show up in devbox search. For example, To use go1.20.5 I need to do the following in devbox.json:

"github:nixos/nixpkgs/deb3d80ae0ccafe4f19d3edf32e2eb7fda283978#go",

Though this is the legacy format, it's required for me for the moment.

Expected Behavior (fix) devbox should not notify about legacy package formats until the devbox index contains more recent packages.

Additional context

➜  teleport git:(mike.wilson/update-go-in-devbox) ✗ devbox version -v
Version:     0.5.5
Platform:    darwin_arm64
Commit:      891e8de7a8ab7a3fec42fad069326d68cb84603e
Commit Time: 2023-06-19T19:18:00Z
Go Version:  go1.20.5
Launcher:    0.2.0
{
  "packages": [
    "addlicense@1.0.0",
    "bash",
    "bats@1.3.0",
    "github:nixos/nixpkgs/d7f28652048b3bed6a512542e62ea1a50691e349#buf",
    "clang@11.1.0",
    "gci@0.9.1",
    "git",
    "github:nixos/nixpkgs/deb3d80ae0ccafe4f19d3edf32e2eb7fda283978#go",
    "github:nixos/nixpkgs/22540da6c19a41512dd6bc575858e1215baeb3f9#golangci-lint",
    "libiconvReal@1.16",
    "libfido2@1.13.0",
    "nodejs@16.18.1",
    "github:nixos/nixpkgs/b39bfdc033e1d79f2b58e1630530e5d54b19e698#openssl",
    "patchelf@0.15.0",
    "protobuf3_20@3.20.3",
    "python@3.11.2",
    "shellcheck@0.9.0",
    "yamllint@1.28.0",
    "zlib@1.2.13",
    "path:build.assets/flake#conditional",
    "path:build.assets/flake#grpc-tools",
    "path:build.assets/flake#helm",
    "path:build.assets/flake#libpcsclite",
    "path:build.assets/flake#node-protoc-ts",
    "path:build.assets/flake#protoc-gen-gogo",
    "path:build.assets/flake#rust",
    "path:build.assets/flake#yarn"
  ],
  "shell": {
    "init_hook": [
      "export TELEPORT_DEVBOX=1",
      "unset GOROOT"
    ]
  },
  "nixpkgs": {
    "commit": "b3f5bcf0be3e15226b0e9d698aa734ee098aa08f"
  }
}
mdwn commented 1 year ago

I might be wrong about this -- looks like this only applied for bash and git. I'll close this so as not to clutter up the backlog.