Skip to content

fix(http-canonicalization): bump to 0.16.2 to fix duplicate Alloy load [skip chg] - #11456

Open
timotheeguerin wants to merge 2 commits into
mainfrom
fix/http-canonicalization-alloy-version
Open

fix(http-canonicalization): bump to 0.16.2 to fix duplicate Alloy load [skip chg]#11456
timotheeguerin wants to merge 2 commits into
mainfrom
fix/http-canonicalization-alloy-version

Conversation

@timotheeguerin

@timotheeguerin timotheeguerin commented Jul 29, 2026

Copy link
Copy Markdown
Member

Fixes #11443

Problem

Compiling a project that uses @typespec/http-server-csharp with npm fails at load time with:

error js-error: ... Multiple versions of Alloy are loaded for this project.

Two incompatible @alloy-js/core copies get installed and both load: 0.24.1 (hoisted) and 0.22.0 (nested under @typespec/http-canonicalization).

Root cause

  • Published @typespec/http-server-csharp@0.58.0-alpha.30 depends on @typespec/emitter-framework@^0.19.0 (Alloy 0.24) and @typespec/http-canonicalization@^0.16.1.
  • ^0.16.1 resolves to the stale stable @typespec/http-canonicalization@0.16.1, whose published deps still require @typespec/emitter-framework@^0.17.0 (Alloy 0.22).
  • npm 7+ auto-installs the unmet ^0.22.0 peer → a second nested @alloy-js/core@0.22.0 → Alloy's runtime guard throws.

Why the stable range went stale (a chronus bug)

@typespec/emitter-framework received minor bumps 0.17 → 0.18 → 0.19 (Alloy peer ^0.22 → ^0.24). @typespec/http-canonicalization depends on it via workspace:^, but chronus 1.3.1 did not force workspace:^ dependents to re-release on a minor bump of a 0.x dependency (for 0.x, ^0.n.x locks the minor, so a minor bump is effectively breaking). As a result http-canonicalization's stable latest stayed frozen at 0.16.1 with the old ^0.17.0 range.

This was fixed upstream in chronus 1.4.0 (timotheeguerin/chronus#590), which is already adopted here, so it won't recur.

Fix

Manually bump @typespec/http-canonicalization to 0.16.2 and add the changelog entry ([skip chg]) to force a targeted patched re-release. On publish its workspace:^ emitter-framework dependency is resolved to the current line (Alloy 0.24), so a single Alloy version is required across the tree.

Patch (not minor) is deliberate: http-server-csharp@0.58.0-alpha.30 requests ^0.16.1 (>=0.16.1 <0.17.0), so 0.16.2 is picked up automatically and retroactively fixes already-published consumers; 0.17.0 would not satisfy that range.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/http-canonicalization
Show changes

…rk/alloy version [skip chg]

The published http-canonicalization@0.16.1 still required @typespec/emitter-framework@^0.17.0 (Alloy 0.22) while everything else moved to emitter-framework@0.19 (Alloy 0.24). npm installs of @typespec/http-server-csharp therefore loaded two incompatible @alloy-js/core copies ("Multiple versions of Alloy are loaded").

Manually bump the version and changelog to force a patched 0.16.2 stable release whose emitter-framework dependency is realigned, resolving the conflict for existing ^0.16.1 consumers.

Fixes #11443
@timotheeguerin
timotheeguerin force-pushed the fix/http-canonicalization-alloy-version branch from 92f32c3 to 1166a2e Compare July 29, 2026 19:36
@timotheeguerin timotheeguerin changed the title fix(http-canonicalization): realign emitter-framework/alloy version to fix duplicate Alloy load fix(http-canonicalization): bump to 0.16.2 to fix duplicate Alloy load [skip chg] Jul 29, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-canonicalization@11456

commit: a34b082

@azure-sdk-automation

azure-sdk-automation Bot commented Jul 29, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@timotheeguerin
timotheeguerin marked this pull request as ready for review July 29, 2026 22:54
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.

http-server-csharp: npm install loads two incompatible @alloy-js/core versions ('Multiple versions of Alloy are loaded')

1 participant