jetify-com / devbox

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

[Bug]: devbox 'latest' installs old versions #1297

Closed bonds closed 1 year ago

bonds commented 1 year ago

Current Behavior (bug)

devbox global update installs old versions of packages sometimes. The latest example is with starship:

~ on  main [!]
at 16:07:35  ❯ devbox search starship
Found 1+ results for "starship":

* starship  (2022-04-12, 1.15.0, 1.14.2, 1.14.1, 1.13.1, 1.13.0, 1.12.0, 1.11.0, 1.10.3, 1.10.2)

When I ran devbox global update today, I got what I think was the 2022-04-12 version instead of the 1.15.0 version. I pinned to version 1.15.0 as a workaround. I've had the same problem and used the same workaround for the idris2 package.

Expected Behavior (fix)

When I've installed a package and pinned it to the 'latest' version, devbox global update should install the latest version, not an old version.

Additional context Please include the output of devbox version -v and a copy of your devbox.json file.

~ on  main [!]
at 16:07:36  ❯ devbox version -v
Version:     0.5.7
Platform:    darwin_arm64
Commit:      95ee45715bd2d5a7e60cd58093f2a87a88a4564d
Commit Time: 2023-07-12T22:28:00Z
Go Version:  go1.20.5
Launcher:    0.2.0
~ on  main [!]
at 16:11:35  ❯ cat ~/.local/share/devbox/global/current/devbox.json
{
  "packages": [
    "alacritty@latest",
    "angband@latest",
    "atuin@latest",
    "btop@latest",
    "cabal-install@latest",
    "cloc@latest",
    "cowsay@latest",
    "crawl@latest",
    "dogdns@latest",
    "fd@latest",
    "ffmpeg@latest",
    "fish@latest",
    "fortune@latest",
    "fzf@latest",
    "ghc@latest",
    "haskell-language-server@latest",
    "haxor-news@latest",
    "helix@latest",
    "hugo@latest",
    "hyfetch@latest",
    "hyperfine@latest",
    "jq@latest",
    "libiconv@latest",
    "libreoffice-bin@latest",
    "lsd@latest",
    "mpv@latest",
    "mtr@latest",
    "pigz@latest",
    "pstree@latest",
    "pv@latest",
    "python@3.10",
    "python310Packages.numpy@latest",
    "python310Packages.torch@latest",
    "qrencode@latest",
    "ripgrep@latest",
    "rlwrap@latest",
    "starship@1.15",
    "tree@latest",
    "vscode@latest",
    "wget@latest",
    "wiki-tui@latest",
    "rustc@latest",
    "cargo@latest",
    "bat@latest",
    "sysbench@latest",
    "docker@latest",
    "docker-compose@latest",
    "colima@latest",
    "tldr@latest",
    "chatgpt-cli@latest",
    "mas@latest",
    "idris2@0.6.0",
    "bfs@latest"
  ],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null",
      "/Users/scott/bin/darwin/create_devbox_app_aliases",
      "exec fish"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}
Lagoja commented 1 year ago

Likely related to #1472 #1431, index should have an update to fix it, but needs validation

Lagoja commented 1 year ago

This is sorted properly now in the devbox search output:

❯ devbox search starship --show-all
Found 1+ results for "starship":

* starship  (1.16.0, 1.15.0, 1.14.2, 1.14.1, 1.13.1, 1.13.0, 1.12.0, 1.11.0, 1.10.3, 1.10.2, 1.10.1, 1.10.0, 1.9.1, 1.8.0, 1.7.1, 1.6.3, 1.6.2, 2022-04-12, 1.5.4, 1.3.0, 1.2.1, 1.1.1, 1.0.0, 0.58.0, 0.57.0, 0.56.0, 0.55.0, 0.54.0, 0.53.0, 0.52.1, 0.51.0, 0.50.0, 0.49.0, 0.48.0, 0.47.0, 0.46.2, 0.45.2, 0.44.0, 0.43.0, 0.42.0)