Skip to content

Check the boundary of the major being compiled - #9

Merged
pathscale merged 1 commit into
masterfrom
fix/solid-2-boundary-validation
Aug 20, 2026
Merged

Check the boundary of the major being compiled#9
pathscale merged 1 commit into
masterfrom
fix/solid-2-boundary-validation

Conversation

@pathscale

Copy link
Copy Markdown
Owner

boundaryFor() maps Solid 1 to solid-layouts/application-boundary and Solid 2
to solid-layouts/solid-2/application-boundary, and the library generator uses
it, so a solid: 2 build writes the solid-2 spelling into its entry.

validateComponent() did not ask. It greped for the hardcoded 1.9 specifier,
which made the pairing this package generates the pairing it rejects:

<pkg>: <Name> entry has no application compiler boundary

naming a file that was exactly right.

The fix

Thread the major from compileApplication through resolveLayoutSource to
validateComponent and ask boundaryFor() — which is what the plugin two
functions away already does.

boundaryFor(undefined) still returns the 1.9 boundary, so nothing changes for a
consumer that never sets solid. Neither specifier contains the other as
written, so includes cannot accidentally accept the wrong one in either
direction.

How it surfaced

From the consumer side, porting Chuzz's chrome to Solid 2. There was no
combination of arms that worked:

  • generating for 1.9 emits solid-js/web imports, a subpath Solid 2 does not
    export, so the bundle fails earlier with Package subpath './web' is not defined by "exports"
  • generating for 2 failed the check above

Tests

Two, both of which fail without the change: a solid-2 entry is accepted under
solid: 2, and a 1.9 entry is rejected under it.

The boundary check had no coverage at all, which is how the mismatch
shipped. 16/16 pass with the fix; reverting just the one-line condition fails
exactly the two new tests.

`boundaryFor()` maps Solid 1 to `solid-layouts/application-boundary` and Solid 2
to `solid-layouts/solid-2/application-boundary`, and the library generator uses
it, so a `solid: 2` build writes the solid-2 spelling into its entry.

`validateComponent()` did not ask. It greped for the hardcoded 1.9 specifier,
which made the pairing this package generates the pairing it rejects: a correct
Solid 2 bundle failed with

    <pkg>: <Name> entry has no application compiler boundary

naming a file that was exactly right. Neither specifier contains the other as
written, so `includes` cannot accidentally accept the wrong one either way round.

Thread the major from `compileApplication` through `resolveLayoutSource` to
`validateComponent` and ask `boundaryFor()`, which is what the plugin two
functions away already does. `boundaryFor(undefined)` still returns the 1.9
boundary, so nothing changes for a consumer that never sets `solid`.

Found from the consumer side: a Chuzz build on Solid 2 could not get a library
past validation with either arm. Generating for 1.9 emits `solid-js/web`
imports, a subpath Solid 2 does not export; generating for 2 failed the check
above. There was no combination that worked.

Two tests, both of which fail without the change: a solid-2 entry is accepted
under `solid: 2`, and a 1.9 entry is rejected under it. The boundary check had
no coverage at all, which is how the mismatch shipped.
@pathscale
pathscale merged commit 2e38e59 into master Aug 20, 2026
5 checks passed
@pathscale
pathscale deleted the fix/solid-2-boundary-validation branch August 20, 2026 08:52
pathscale pushed a commit to pathscale/chuzz that referenced this pull request Aug 20, 2026
The boundary rewrite and its alias are two halves of one thing, and the
upstream fix for both is merged (pathscale/solid-layouts#9). Name it, so
whoever sees solid-layouts-oxc publish past 0.2.1 knows the pair can go
together rather than guessing which of the three aliases is load-bearing.

The solid-2 arm aliases are not temporary: the package ships one build per
Solid major and a consumer has to pick.
pathscale pushed a commit to pathscale/chuzz that referenced this pull request Aug 20, 2026
The boundary rewrite and its alias are two halves of one thing, and the
upstream fix for both is merged (pathscale/solid-layouts#9). Name it, so
whoever sees solid-layouts-oxc publish past 0.2.1 knows the pair can go
together rather than guessing which of the three aliases is load-bearing.

The solid-2 arm aliases are not temporary: the package ships one build per
Solid major and a consumer has to pick.
@pathscale
pathscale restored the fix/solid-2-boundary-validation branch August 25, 2026 17:49
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.

1 participant