Skip to content

Releases: jetify-com/devbox

0.0.0-edge.2023-10-19

19 Oct 09:18
c167ca7
Compare
Choose a tag to compare
0.0.0-edge.2023-10-19 Pre-release
Pre-release

0.0.0-edge.2023-10-19 edge release

0.7.0 - Perf Improvements (Round 2) and more

12 Oct 19:02
2d8c4ff
Compare
Choose a tag to compare

What’s New in This Release

Faster Install Performance

Building on perf improvements in Devbox 0.6.0, we’ve streamlined our package install process and removed some inefficiencies to speed up adding, removing, and upgrading packages. Users should see big improvements when adding or updating packages, and when using devbox global.

  1. We improved how we cache the Devbox environment so we can avoid recomputing the full shell environment whenever a package is added or removed.
  2. To speed up host shell startup times, we also no longer recompute the devbox global shellenv when a new host shell starts.
  3. We refactored our shellenv generation code to remove redundant function calls and recomputation of the project’s shell environment.
  4. We now check the cache status for user packages concurrently, which should improve performance on slow connections.

Devbox Scripts now Exit on Failure

Scripts defined in your devbox.json will now run with the bash errexit flag on by default. This means that when a line in your script returns an error code, Devbox will stop execution and print an error to your terminal.

For example, if you have the following script defined:

"error_test": [
	  "echo 'Hello'",
	  "foo", // Not a real command, will throw an error
	  "echo 'Goodbye'" // This line will not execute
],

Running the script will return the following:

> devbox run error_test

Hello
/workspace/.devbox/gen/scripts/error_test.sh: line 6: foo: command not found
Error: error running script "error_test" in Devbox: exit status 127

This setting only applies to project scripts, and will not apply to devbox global or to init_hooks. You can let your script continue executing after an error by adding set +e to the begginning of the script:

"pass_test": [
	  "set +e",
	  "echo 'Hello'",
	  "foo", // Throws an error, does not stop execution
	  "echo 'Goodbye'"
],

Better Scripting with Project Environment Variables

Devbox now sets a few environment variables that can be used for better scripting within a Devbox shell environment. These environment variables will be set for your current project whenever you run devbox shell, devbox run, or devbox services:

  • DEVBOX_PROJECT_ROOT: Set to the root directory of your current project, where the devbox.json is kept
  • DEVBOX_CONFIG_DIR: Set to $DEVBOX_PROJECT_ROOT/devbox.d, which is where package level config should be stored
  • DEVBOX_PACKAGE_DIR: Set to $DEVBOX_PROJECT_ROOT/.devbox/virtenv/.wrappers, which is where package binaries, libraries, and other files for the current project are stored

Bug Fixes

  • Fixed a bug affecting mysql + mariadb plugins that caused caused devbox services up to fail
  • Fixed a security vulnerability with the codeclysm package

What's Changed

  • [errors] Show better errors when user script errors out and fix poetry plugin by @mikeland73 in #1511
  • impl: set SHELL environment variable by @gcurtis in #1512
  • [fish] do not print hash -r in shellenv by @savil in #1516
  • all: (mostly) automated clean up by @gcurtis in #1513
  • [remove nixpkgs] enable feature for next release by @savil in #1517
  • [RFC][update] Add --all-projects flag by @mikeland73 in #1515
  • [CICD] Move gofumpt check to CICD, add cache by @mikeland73 in #1518
  • [shellenv] fix PATH nesting for devbox-project and devbox-global by @savil in #1508
  • [auth] Update to newest auth pkg by @mikeland73 in #1519
  • [UX] print statement for recomputing the nixEnv by @savil in #1521
  • [nix] Pin nix version to 2.17.1 by @mikeland73 in #1526
  • [fish] unbreak init-hook by @savil in #1525
  • [bin-wrappers] Reduce/improve when we create bin wrappers by @mikeland73 in #1522
  • [add] Print messages about actions taken, or not taken. by @savil in #1527
  • [perf] FillNarInfoCache during nix profile's pendingPackagesForInstallation by @savil in #1528
  • [lockfile] When updating store-paths, we should update all fields by @savil in #1530
  • [script set -e] enable feature flag by @savil in #1533
  • [RFC] [refactor] Consolidate profile update code under syncPackagesToProfile by @savil in #1529
  • [perf] Replace only-path-without-wrappers with sed by @mikeland73 in #1535
  • [runx] Proof of concept for runx integration by @mikeland73 in #1524
  • [global] global shellenv should not recompute env by @mikeland73 in #1534
  • [runx] Add runx validate, lockfile resolve by @mikeland73 in #1542
  • [plugins] Remove trigger package by @mikeland73 in #1545
  • [minor cleanup] use flake dir instead of flake-file-path in nix print-dev-env by @savil in #1538
  • [error ux] print script name upon error by @savil in #1547
  • [runx] Use single path for all runx binaries by @mikeland73 in #1544
  • [perf UX] add spinner to print-dev-env output by @savil in #1551
  • [perf] skip forcing printDevEnv when add/rm/update outside shellenv by @savil in #1540
  • [perf] in syncPackagesToProfile, only removeExtraItemsFromProfile is mode is not install by @savil in #1541
  • add helpful env vars during shell + run by @Lagoja in #1548
  • [cicd] Unify lint, add caching by @mikeland73 in #1549
  • [poetry plugin] ensure initHook runs with /bin/sh by @savil in #1553
  • [dependencies] update go.jetpack.io/pkg and go mod tidy by @savil in #1554

Full Changelog: 0.5.14...0.7.0

0.6.0 - Faster Package Installs and Updates

03 Oct 22:28
Compare
Choose a tag to compare

New in this Release

Devbox 0.6 speeds up Nix package installs and updates for all local and global Devbox projects. Users should see an improvement of 30 seconds or more when adding a new package and more significant gains when updating or installing projects with many packages.

To upgrade to Devbox 0.6 from an earlier version of devbox, run devbox version update. You can install Devbox using the Devbox Installer or the Nix Package Manager.

Read on to learn more about Devbox 0.6. See Notes below for important details on upgrading to Devbox 0.6

How it works

Installing a package with Nix requires Nix to download and evaluate a snapshot of the Nixpkgs registry. For Devbox users, this has generally appeared as follows:

$ devbox install
Ensuring packages are installed.
Ensuring nixpkgs registry is downloaded.
[33.2 MiB DL]
< long delay while nixpkgs evaluates the registry >

This download and evaluation step took several seconds for Nix to complete. If a package in the same project relied on a different snapshot, Nix would repeat this download and evaluation loop. Devbox would hang for a long time while waiting for Nix to return from this process.

Devbox 0.6 leverages a new feature in Nix 2.17 to skip this evaluation step for packages in the Nix cache. When adding or updating packages with Devbox 0.6, the Devbox Search API will provide the correct nix-store-paths for binaries in the Nix cache and add them to the devbox.lock file. Devbox can then read the store paths and generate a Nix Flake to install them directly using builtins.fetchClosure. Since we download the packages directly, Nix no longer needs to evaluate the nixpkgs registry at install time.

Notes

  • Faster Package Installs require Nix ≥ 2.17. If you have an older version of Nix installed, Devbox will revert to the original behavior for installing packages
    • You can check your Nix version by running Nix --version.
    • To upgrade to a newer version of Nix, see the Nix Manual here.
  • Devbox will default to the old behavior of evaluating a nixpkgs snapshot for packages not in Nix's binary cache.

Bug Fixes

  • Fixed a bug where the SHELL environment was not set correctly
  • Fixed a bug with the Poetry plugin.
  • Shows better errors when a user script fails

Full Changelog

  • [errors] Show better errors when user script errors out and fix poetry plugin by @mikeland73 in #1511
  • impl: set SHELL environment variable by @gcurtis in #1512
  • [fish] do not print hash -r in shellenv by @savil in #1516
  • all: (mostly) automated clean up by @gcurtis in #1513
  • [remove nixpkgs] enable feature for next release by @savil in #1517

Full Changelog: 0.5.14...0.6.0

0.5.14

29 Sep 19:04
0d64e71
Compare
Choose a tag to compare

New in this release:


  • User created plugins can now specify an init_hook that will always run before starting a shell or running a script.


Bug Fixes

  • Fixed an issue that prevented global services from running
  • Fixed an issue with the NGINX plugin using the wrong version of envsubst for environment variable substitution
  • Fixed an issue where Devbox would fail to detect locally installed flakes
  • Updated error message when a user tries to remove a package from devbox.json that has not yet been installed

Special Thanks To:

Full Changelog

  • [rm nixpkgs] enable feature flag (assuming tests pass) by @savil in #1443
  • improve documentation by @pinage404 in #1451
  • Remove not existed command from documentation by @Akiyamka in #1456
  • [profile remove] if package was not found, change message from error to info by @savil in #1458
  • [rm-nixpkgs] drop warning about missing store path when updating lockfile by @savil in #1459
  • [remove-nixpkgs] Disable remove-nixpkgs to fix non-search fallback by @mikeland73 in #1463
  • [easy] run devbox update to add system-info and store-paths to devbox.lock by @savil in #1460
  • [debug] Print exec time by @mikeland73 in #1461
  • fix: spelling by @bketelsen in #1470
  • Fix envsubst issues by @Lagoja in #1462
  • [telemetry] add nix.version to sentry and segment by @savil in #1469
  • [nar info cache] Only fillNarInfoCache in perf-sensitive code path by @savil in #1468
  • [nix] Fix profile list index for raw flakes by @mikeland73 in #1471
  • Bump puma from 5.6.5 to 5.6.7 in /examples/stacks/rails/blog by @dependabot in #1409
  • Update docker-image-release.yml to support ARM builds for newer Macbooks by @eljohnson92 in #1455
  • [narInfoCache] Use sync.Map and simplify IsInBinaryCache by @mikeland73 in #1473
  • [Script Exit on Error] enable feature flag, and add stability advice to CICD docs by @savil in #1477
  • [envsec] Initial envsec integration by @mikeland73 in #1474
  • [envsec] Fix devbox.json field and handle envsec errors by @mikeland73 in #1482
  • [global] Fix global services by @mikeland73 in #1484
  • [script-on-error] disable for fish shell, and add testscript unit-test by @savil in #1488
  • [perf] Profile possibly slow functions by @mikeland73 in #1491
  • [auth] Use new auth package by @mikeland73 in #1492
  • [script-exit-on-error] disable for init-hooks by @savil in #1493
  • [cicd] Test nix 2.18 by @mikeland73 in #1496
  • [envsec] Use runx to install envsec by @mikeland73 in #1497
  • [plugins] Fix init hooks for custom plugins by @mikeland73 in #1500
  • Update plugin documentation by @Lagoja in #1502
  • [update] Add sync flag which syncs all dependencies to same resolved version under current working dir by @mikeland73 in #1501
  • [envsec] Add envsec to path if used in config by @mikeland73 in #1505
  • [code-cleanup] Rename devbox.Writer to Stderr by @mikeland73 in #1507
  • [features] Turn off Remove Nixpkgs and Script Exit on Error by @savil in #1510

New Contributors

Full Changelog: 0.5.13...0.5.14

0.0.0-edge.2023-09-28

28 Sep 09:19
5ed2c80
Compare
Choose a tag to compare
0.0.0-edge.2023-09-28 Pre-release
Pre-release

0.0.0-edge.2023-09-28 edge release

0.0.0-edge.2023-09-21

21 Sep 09:11
256c9a4
Compare
Choose a tag to compare
0.0.0-edge.2023-09-21 Pre-release
Pre-release

0.0.0-edge.2023-09-21 edge release

0.0.0-edge.2023-09-14

14 Sep 09:15
62f25d0
Compare
Choose a tag to compare
0.0.0-edge.2023-09-14 Pre-release
Pre-release

0.0.0-edge.2023-09-14 edge release

0.5.13

06 Sep 00:58
9e85678
Compare
Choose a tag to compare

What's new in this Release

  • Fixes an issue with triggering a nix install even for commands that don't require it, like devbox version

Changelog

  • 9e85678 [devbox.Open] drop ensureNixInstalled function call (#1453)
  • 4f014e2 docs: Update action version in github_action.md (#1449)
  • 27be737 [Github Action] cli-test: improve naming summary (#1448)
  • d219b01 Docs for platform-specific packages (#1441)
  • 066944e [rm nixpkgs] use path-from-hash-part command when updating lock file (#1442)

0.5.12

05 Sep 18:20
49ddee7
Compare
Choose a tag to compare

What's New in This Release

Platform Specific Packages

  • Users can now add packages to their devbox.json that will only install on specific platforms. This is useful when you need to install specific packages on Linux or macOS that are not compatible with different platforms.
    • To only install a package on a specific platform, you can use devbox add <package> --platform <platforms>. For example: devbox add busybox --platform x86_64-linux,aarch64-linux will add busybox to your devbox.json, but only install it on Linux Platforms
    • To prevent devbox from installing on a specific platform, you can use devbox add <package> --exclude-platform <platforms>
  • Note: Specifying platforms for packages will alter your devbox.json in a way that is only compatible with Devbox 0.5.12 and newer. You can update Devbox using devbox version update

Customize the NGINX Plugin with Environment Variables

  • Our NGINX plugin now installs and uses envsubst so that developers can manage and customize their nginx.conf file with environment variables. This is similar to how NGINX docker containers work.

Public Docker Image for Devbox

  • We now publish an official Docker image for Devbox at jetpackio/devbox. You can use this image to run Devbox in CI/CD, or to test Devbox without installing Nix locally
  • We've also updated devbox generate dockerfile|devcontainer to use this public image, which should simplify and speed up local image builds

devbox info Improvements

  • devbox info now shows the summary information for packages, along with any plugins that are available for the package.

Bug Fixes and Improvements

  • Devbox will now skip version checks for commands like devbox log
  • Fixed a permissions issue that could affect the .devbox folder when switching between using Devbox locally and in a Docker container
  • Improved performance for devbox run by skipping binwrapper generation
  • Added checks to ensure plugin packages are added to nix profile
  • Fixed a bug for nix profile list that affected packages added by store path

What's Changed

  • Update node example to use the prebuilt binary by @LucilleH in #1362
  • [extension] Added github action step to publish to openvsx by @mohsenari in #1341
  • [docs] Updated docs for --root-user flag by @mohsenari in #1365
  • Add docs for --env and devbox run changes by @Lagoja in #1366
  • [vscode extension] Fixed github action workflow error by @mohsenari in #1368
  • Added --root-user flag to devbox generate by @mohsenari in #1359
  • [plugins] Ensure plugin packages are in nix profile by @mikeland73 in #1367
  • [Packages] Introduce the concept of Installable packages by @savil in #1357
  • devbox.findPackagesByName should be constructed from Config packages by @savil in #1360
  • [bin-wrappers] Don't use wrappers on run by @mikeland73 in #1361
  • [per-OS Packages] Add platforms and excluded_platforms functionality by @savil in #1358
  • [per-OS Packages] in devbox add, allow multiple --platform/--exclude-platform flag values by @savil in #1363
  • [per-OS Packages] Suggest --platform/--exclude-platform upon error with installing package that is uninstallable on user's platform by @savil in #1364
  • [per-OS Packages] fix devbox update for unversioned packages with platform/excluded-platform by @savil in #1370
  • [per-OS Packages] Error if adding --platform, when excluded_platforms is defined by @savil in #1373
  • [nix.System] call EnsureNixInstalled from devbox.Open, and cleanup function API by @savil in #1374
  • [info] Modernize via search api by @savil in #1376
  • [Remove Nixpkgs] Ensure we run cli-tests for oldest supported nix version, and 2.17 by @savil in #1375
  • [docs] update docs to highlight restrictions for direnv integration by @LucilleH in #1377
  • [rm nixpkgs] make HEAD request to BinaryCache to ensure binary is cached by @savil in #1318
  • [cli-test] speed up yarn example by @savil in #1386
  • [cli-tests] fix by pinning dependencies in rails examples by @savil in #1408
  • [docs] Added pure flag docs by @mohsenari in #1411
  • [per-OS Packages] Improve error message if package is uninstallable by @savil in #1387
  • [Remove Nixpkgs] move concurrency code to own file by @savil in #1412
  • fix: typo in mysql process-compose.yml by @kei01234kei in #1383
  • [docs] Added devbox global push docs page by @mohsenari in #1414
  • [global] Added hardcoded region to push pull bucket by @mohsenari in #1413
  • Add missing READMEs to templates, fix lint by @Lagoja in #1418
  • Change YAML titles to H1 for better rendering by @Lagoja in #1419
  • [dockerhub] Added action for publishing docker image by @mohsenari in #1421
  • Give Github Actions instance more disk by @ipince in #1427
  • [shell] Support zim (a zsh framework) by @savil in #1428
  • [rm-nixpkgs] Fix profile list bug for packages added by store path by @ipince in #1416
  • Read all store paths from profile item by @ipince in #1417
  • Fix bug when comparing profile item added by store path by @ipince in #1422
  • [bug fix] do not check version for devbox log, and for commands whose prefix is in the skip-list by @savil in #1424
  • docs: devbox remove command not exist, only rm by @Akiyamka in #1433
  • [go] update to 1.21 version by @savil in #1436
  • [generate] Updated dockerfile template to use devbox image by @mohsenari in #1432
  • bug fix: FillNarInfoCache for versioned packages when adding package by @savil in #1437
  • introduce testscript-examples updater, and update the examples by @savil in #1438
  • [golangci-lint] bump action to latest release by @savil in #1439
  • Use envsubst in our NGINX plugin by @Lagoja in #1435
  • [per-OS Packages] omitempty for version in expanded Package json representation by @savil in #1440
  • [Github Action] Only run max space action on ubuntu by @savil in #1447

New Contributors

Full Changelog: 0.5.11...0.5.12

0.0.0-edge.2023-08-31

31 Aug 09:13
e44103a
Compare
Choose a tag to compare
0.0.0-edge.2023-08-31 Pre-release
Pre-release

0.0.0-edge.2023-08-31 edge release