Skip to content

fix(client): apply the package override before deriving identity - #250

Draft
salmans wants to merge 1 commit into
bytecodealliance:mainfrom
salmans:fix-package-override
Draft

fix(client): apply the package override before deriving identity#250
salmans wants to merge 1 commit into
bytecodealliance:mainfrom
salmans:fix-package-override

Conversation

@salmans

@salmans salmans commented Aug 11, 2026

Copy link
Copy Markdown

DecodedComponent::from_publishing_source_with_package extracted (package, version) from the decoded binary first and applied the override second, so publish_release_data failed for any binary without an embedded version before the override was consulted. A WIT package without a version that was published with PublishOpts { package: Some(..) } always failed with "version not found", even though that error's help text suggests supplying the identity explicitly.

The change derives the identity from the binary only when no override is supplied. The change left the no-override constructor without callers, so the two constructors are collapsed into one that takes Option<(PackageRef, Version)>; the module is crate-private, so there's no public API change.

@salmans
salmans force-pushed the fix-package-override branch 2 times, most recently from 5b34332 to 35bddb9 Compare August 11, 2026 22:37
The override was applied only after `(package, version)` had been
extracted from the binary, so it could never supply a missing identity —
and a compiled component never has one (it decodes as an unversioned
`root:component`). Extract only when no override is given. The
no-override constructor lost its callers and is folded into the
override-taking one; the module is crate-private, no public API change.
@salmans
salmans force-pushed the fix-package-override branch from 35bddb9 to 721945c Compare August 12, 2026 14:25
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