Skip to content

wasm-pkg-client: validate semver compliance on publish#213

Merged
mkatychev merged 2 commits into
bytecodealliance:mainfrom
ryan-surname-p:oci-client-publish-128
Jul 2, 2026
Merged

wasm-pkg-client: validate semver compliance on publish#213
mkatychev merged 2 commits into
bytecodealliance:mainfrom
ryan-surname-p:oci-client-publish-128

Conversation

@ryan-surname-p

Copy link
Copy Markdown
Contributor

closes #128

Summary

By default publish:

  • rejects duplicate registrations
  • ensures component is compatible with it's nearest server series neighbors using wit_component::check_semver

The changeset is fairly large I know though a material amount of the new code are tests and moving functions around to keep things readable.

@ryan-surname-p ryan-surname-p marked this pull request as ready for review June 3, 2026 16:37
Comment thread crates/wasm-pkg-client/src/decoded_component.rs Outdated
@vados-cosmonic

Copy link
Copy Markdown
Contributor

Hey @ryan-surname-p it looks like some conflicts creeped in -- apologies for the inconvenience but would you mind resolving those? Then we can get this merged.

@ryan-surname-p

Copy link
Copy Markdown
Contributor Author

No problem at all.

@mkatychev actually reached out to me about this and some work they have in flight as well.

#215

If I understood their request correctly we'd like for that to land first and then work some version of this onto that.

This request seemed reasonable enough to me so the current plan is to monitor the progress of 215 and then adjust accordingly.

@mkatychev

mkatychev commented Jun 26, 2026

Copy link
Copy Markdown
Member

I'd like to hear @vados-cosmonic's thoughts on which should land first.

I suppose one of us will be handling gnarly merge conflicts regardless so it may be fairer for @ryan-surname-p's changes to land first.

@ryan-surname-p ryan-surname-p force-pushed the oci-client-publish-128 branch from cbca048 to 77a1e3e Compare June 26, 2026 13:35
@ryan-surname-p

Copy link
Copy Markdown
Contributor Author

FWIW I'm happy enough to handle either approach I just wanted to make sure everyone was working with the same set of assumptions.

Comment thread crates/wasm-pkg-client/src/loader.rs Outdated
Comment thread crates/wasm-pkg-client/src/loader.rs Outdated
Comment thread crates/wkg/src/main.rs Outdated
Comment thread crates/wasm-pkg-client/src/loader.rs
Comment thread crates/wasm-pkg-client/src/loader.rs Outdated
Comment thread crates/wasm-pkg-client/src/decoded_component.rs
@mkatychev

Copy link
Copy Markdown
Member

@ryan-surname-p the multi publish package PR has landed, could you address the conflicts and #213 (comment)?

@ryan-surname-p

Copy link
Copy Markdown
Contributor Author

Thanks for the heads up, I'll get to this first thing tomorrow.

I followed up on #213 (comment) but I realize now you weren't actually able to see it because I never submitted my review 🤦

@ryan-surname-p ryan-surname-p force-pushed the oci-client-publish-128 branch from 0199b6f to 4e10a3a Compare July 1, 2026 16:12
@mkatychev mkatychev self-requested a review July 1, 2026 17:34
Comment thread crates/wkg/tests/e2e.rs
mkatychev

This comment was marked as outdated.

Comment thread crates/wasm-pkg-client/src/lib.rs Outdated
Comment thread crates/wkg/src/main.rs Outdated
Comment thread crates/wasm-pkg-client/tests/publish_semver_check.rs Outdated
Comment thread crates/wasm-pkg-client/tests/publish_semver_check.rs
@mkatychev

mkatychev commented Jul 2, 2026

Copy link
Copy Markdown
Member

wit_component::check_semver is really cool, like cargo-semver-checks for wit!

If we can address||change the nits about Shape, skip_semver_check, impl PartialOrd for DecodedComponent, and assert_matches! then this LGTM!

Comment thread crates/wasm-pkg-client/tests/publish_semver_check.rs Outdated
@ryan-surname-p ryan-surname-p force-pushed the oci-client-publish-128 branch from 4e10a3a to 43ed86c Compare July 2, 2026 17:18
@mkatychev mkatychev force-pushed the main branch 2 times, most recently from 1903ad5 to 57ee7cd Compare July 2, 2026 17:20
@ryan-surname-p ryan-surname-p force-pushed the oci-client-publish-128 branch from 43ed86c to 2cf52d5 Compare July 2, 2026 17:28

@mkatychev mkatychev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Excited to use this.

@mkatychev mkatychev merged commit 7c9d29b into bytecodealliance:main Jul 2, 2026
3 checks passed
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.

Package publishing should check semver compat

3 participants