Releases: jetify-com/devbox
0.8.1
0.8.0 - Remove binwrappers, devbox.json with comments, and more
What's New in Devbox 0.8
Removing Binwrappers
The most significant change in this release is the removal of binwrappers. Previous versions of Devbox wrapped the binaries in a shim that recalculated the Devbox environment every time they ran. These binwrappers made it possible to instantly use new packages without restarting your shell. However, it also introduced a lot of bugs and complexity to the Devbox environment. More importantly, it had adverse effects on performance and startup times.
This release removes the binwrappers and links directly to the Nix package binaries in your shell environment. This change should make the Devbox environment significantly faster and much more reliable, especially for scripts or environments that invoke Devbox binaries several times.
Comment and trailing commas support in devbox.json
A long requested feature -- you can now annotate your devbox.json
with comments to explain portions of your configuration! For example, you can use comments to annotate and explain your scripts for new users:
{
"packages": [
"go@latest"
],
"scripts": {
// Build for your current architecture
"build": "go build -o dist/devbox ./cmd/devbox",
// Build for all architectures, used mostly in CI/CD
"build-all": [
"GOOS=darwin GOARCH=amd64 go build -o dist/devbox-darwin-amd64 ./cmd/devbox",
"GOOS=darwin GOARCH=arm64 go build -o dist/devbox-darwin-arm64 ./cmd/devbox",
"GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox",
"GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox",
],
}
}
Devbox will also correctly parse your config if you leave a trailing comma, which makes it easier to edit or modify your config directly without triggering syntax errors.
Patch Devbox ELF binaries to use the newest version of glibc
Packages can now take an optional patch_glibc
boolean field. When set to true
, this field will patch the package's ELF binaries to use the latest version of glibc
available in Nixpkgs:
"packages": {
"python": {
"version": "3.7",
"patch_glibc": true
}
}
This flag is useful for fixing dynamic linking issues, or GLIBC incompatibility issues between your Devbox packages and packages installed via Pip or other package managers. This field should generally be omitted or set to false
unless you encounter one of these issues.
Faster installs by caching search results
Devbox will now cache search results when adding a package, which should significantly speed up installation and package additions for configs with a large number of packages.
Better ZSH compatibility
Devbox now respects ZDOTDIR for ZSH startup files, and will copy files instead of linking. This should improve customizability and reliability when using Devbox with ZSH.
Bug Fixes
- Fixed a bug that was forcing users to login to use
devbox global pull/push
. You can now pull or push your global config to your own Git repo without needing to authenticate
Special thanks to:
@az-pz and @dallasgoldswain for making their first contributions to Devbox!
What's Changed
- devconfig: allow comments and trailing commas by @gcurtis in #1539
- impl: remove profileDir from shell by @gcurtis in #1583
- devconfig: use two spaces instead of tab by @gcurtis in #1589
- remove match from docs by @Lagoja in #1591
- [shell] respect ZDOTDIR for zsh startup files, and copy startup files instead of linking by @savil in #1587
- [perf] cache nix.searchSystem by @savil in #1546
- [docs] upgrade docusarus by @LucilleH in #1592
- devpkg: better flake references and installable parsing by @gcurtis in #1581
- [shell] Remove bin wrappers 🎉 by @mikeland73 in #1584
- devconfig,shellgen: option to patch ELF binaries with newer glibc by @gcurtis in #1574
- Fix minor spelling mistake in plugins.md doc. by @az-pz in #1601
- devpkg: use struct field values in FlakeRef.String by @gcurtis in #1597
- devpkg: better handling of escapes in flakeref paths by @gcurtis in #1598
- devpkg: make FlakeInstallable.Outputs a string by @gcurtis in #1599
- added arm64 support for multi user nix in docker by @mohsenari in #1605
- Update process-compose.yml in rails stack by @dallasgoldswain in #1573
- [easy][global] global push/pull should not require login for github by @mikeland73 in #1609
- impl: PATH fix for multiple glibc-patched packages by @gcurtis in #1608
- devpkg: use struct field values in FlakeInstallable.String by @gcurtis in #1600
New Contributors
- @az-pz made their first contribution in #1601
- @dallasgoldswain made their first contribution in #1573
Full Changelog: 0.7.1...0.8.0
0.0.0-edge.2023-11-09
0.0.0-edge.2023-11-09 edge release
0.0.0-edge.2023-11-02
0.0.0-edge.2023-11-02 edge release
0.8.0-dev
What's New in Devbox 0.8
The most significant change in this release is the removal of binwrappers. Previous versions of Devbox wrapped the binaries in a shim that recalculated the Devbox environment every time they ran. These binwrappers made it possible to instantly use new packages without restarting your shell. However, it also introduced a lot of bugs and complexity to the Devbox environment. More importantly, it had adverse effects on performance and startup times.
This release removes the binwrappers and links directly to the Nix package binaries in your shell environment. This change should make the Devbox environment significantly faster and much more reliable.
- Disable binwrappers
- Devbox will automatically install unwrapped binaries the next time you start a shell
- If you install packages while running a
devbox shell
, you may may be prompted to runrefresh
to refresh your environment* *devbox.json
now supports comments and trailing commas
- Option to patch ELF binaries with a newer version of glibc
- See #1574 for more details
- Faster install + remove for large projects by caching search results
- Devbox now respects ZDOTDIR for ZSH startup files, and will copy files instead of linking. This should improve customizability and reliability when using Devbox with ZSH.
How to Install 0.8.0-dev
To test the 0.8 prerelease, export the DEVBOX_USE_VERSION environment variable in your shell
export DEVBOX_USE_VERSION=0.8.0-dev
To revert back to the last release, unset this variable.
Full Changelog
- devconfig: allow comments and trailing commas by @gcurtis in #1539
- impl: remove profileDir from shell by @gcurtis in #1583
- devconfig: use two spaces instead of tab by @gcurtis in #1589
- remove match from docs by @Lagoja in #1591
- [shell] respect ZDOTDIR for zsh startup files, and copy startup files instead of linking by @savil in #1587
- [perf] cache nix.searchSystem by @savil in #1546
- [docs] upgrade docusarus by @LucilleH in #1592
- devpkg: better flake references and installable parsing by @gcurtis in #1581
- [shell] Remove bin wrappers 🎉 by @mikeland73 in #1584
- devconfig,shellgen: option to patch ELF binaries with newer glibc by @gcurtis in #1574
Full Changelog: 0.7.1...0.8.0-dev
0.0.0-edge.2023-10-26
0.0.0-edge.2023-10-26 edge release
0.7.1
What's new in this release
This release includes a number of bug fixes and improvements based on community feedback:
- Added a
down
alias todevbox services stop
. You can now stop your running services usingdevbox services down
- Fixed an issue in our poetry plugin that caused issues when a poetry project was in a subdirectory of the devbox project. You can now tell Devbox where to find your poetry project using the
DEVBOX_PYPROJECT_DIR
environment variable - Fixed a binwrapper issue that could cause an infinite bash loop when using
sed
in devbox - Fixed an issue where variables passed with
--env
or--env-file
were ignored by services. See important notes below:- In order to provide a more consistent environment when running services, we now calculate the Devbox environment prior to running services. This means that variables exported in your shell before running
devbox services
may be overridden by Devbox. - To ensure custom variables are applied for services, we recommend using the
env
field ofdevbox.json
, or using the--env
or--env-file
flags.
- In order to provide a more consistent environment when running services, we now calculate the Devbox environment prior to running services. This means that variables exported in your shell before running
Thanks to everyone who reported an issue on Github, or shared feedback in our Discord channel!
What's Changed
- [services] make down an alias of stop by @savil in #1560
- [sed] Fix bin wrappers when sed is installed with devbox by @mikeland73 in #1566
- [poetry plugin] enable pyproject-dir to be configurable by @savil in #1567
- [telemetry] fix segfault by @savil in #1569
- [wrappers] Always use system bash and sed in bin wrappers by @mikeland73 in #1571
- [services] Fix issue where env var is ignored by @mikeland73 in #1570
Full Changelog: 0.7.0...0.7.1
0.0.0-edge.2023-10-19
0.0.0-edge.2023-10-19 edge release
0.7.0 - Perf Improvements (Round 2) and more
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
0.6.0 - Faster Package Installs and Updates
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