Skip to content

refactor: name main.bend only at the package root - #163

Merged
noah-emp merged 1 commit into
masterfrom
refactor/nested-entries
Oct 29, 2026
Merged

noah-emp merged 1 commit into
masterfrom
refactor/nested-entries

Conversation

@ngngardner

Copy link
Copy Markdown
Contributor

Renames the two nested main.bend files so that only the top-level main.bend is an entry:

  • src/ez/main.bend → src/ez/app.bend: the program module that main.bend imports as App.
  • src/pkg/main.bend → src/pkg/print.bend: the dry-run script that tests/publish.bend runs to print what a publish would upload. It is not named run.bend because that name is a command's interpreter here (src/<cmd>/run.bend).

The references are updated in main.bend, AGENTS.md, tests/publish.bend, the script's usage text, and comments in src/ez/LAWS.bend and src/ez/line.bend. The decision records in docs/rfc/ keep the old paths, since they describe the layout as it was.

Why

Emerging-Patterns/bolt#255 makes a directory whose listing names a main.bend its own package for coverage and trace. Under the old names, ez would split into three packages once it takes that bolt, and its root SPEC.md's Law cells pointing into src/ez/ would break.

Spec

This is a refactor: no SPEC.md row changes and no tagged law changes.

Evidence

  • nix flake check passes.
  • The new bolt lints ez exactly as the old one does: 0 errors, 320 warnings.
  • EZ_ENTRY=src/pkg/path.bend bend src/pkg/print.bend prints the hash, directory and manifest as before.

Note

Renaming src/ez/main.bend changes the published ezx package's hash, so it ships as a new version.

🤖 Generated with Claude Code

`src/ez/main.bend` becomes `src/ez/app.bend` and `src/pkg/main.bend` becomes
`src/pkg/print.bend`. Only the top-level `main.bend` is an entry: the first
is the program module that `main.bend` imports as `App`, and the second is
the dry-run script `tests/publish.bend` runs to print what a publish would
upload. It is not named `run.bend` because that name is a command's
interpreter here.

bolt (Emerging-Patterns/bolt#255) treats a directory whose listing names a
`main.bend` as its own package for `coverage` and `trace`, so the old names
would have split ez into three packages. With the rename, the new bolt lints
ez exactly as the old one does: 0 errors, 320 warnings.

The rename changes the published ezx package's hash, so it ships as a new
version. The decision records in docs/rfc/ keep the old paths, since they
describe the layout as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noah-emp
noah-emp merged commit 7ccc4ac into master Oct 29, 2026
5 checks passed
@noah-emp
noah-emp deleted the refactor/nested-entries branch October 29, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants