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
.
- We improved how we cache the Devbox environment so we can avoid recomputing the full shell environment whenever a package is added or removed.
- To speed up host shell startup times, we also no longer recompute the
devbox global shellenv
when a new host shell starts. - We refactored our shellenv generation code to remove redundant function calls and recomputation of the project’s shell environment.
- 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 thedevbox.json
is keptDEVBOX_CONFIG_DIR
: Set to$DEVBOX_PROJECT_ROOT/devbox.d
, which is where package level config should be storedDEVBOX_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