Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for @deprecated gates to WIT #377

Merged
merged 7 commits into from
Jul 25, 2024

Conversation

yoshuawuyts
Copy link
Member

Closes #374. Adds support for @deprecated gates to WIT. While the text in this PR is ready for review now, we should hold off on merging this until we have implementation feedback. Thanks!

r? @lukewagner

Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

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

lgtm! Let me know once there's any implementation to validate this and then we can merge.

design/mvp/WIT.md Outdated Show resolved Hide resolved
Co-Authored-By: Luke Wagner <mail@lukewagner.name>
design/mvp/WIT.md Outdated Show resolved Hide resolved
design/mvp/WIT.md Outdated Show resolved Hide resolved
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this pull request Jul 18, 2024
@alexcrichton
Copy link
Collaborator

I've got an initial implementation of this at bytecodealliance/wasm-tools#1687 with the most notable difference being my prior comment where @deprecated is required to be paired with @unstable or @stable. Easy to change, but figured I'd put a stick in the sand somewhere.

design/mvp/WIT.md Outdated Show resolved Hide resolved
Co-authored-by: Luke Wagner <mail@lukewagner.name>
@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Jul 22, 2024

@alexcrichton thanks for putting that PR up; that's great! Also it sounds good to me to require @deprecated to always be paired with another gate.

Is there a use case when people might want to combine @unstable and @deprecated? The way I was thinking about this is that in order to mark something as @deprecated it must first be marked as stable. And by definition anything marked with @unstable is not stable?

(Also I wasn't sure what you meant by "stick in the sand" here - I assumed something like: "starting point" and not like "line in the sand"? I had trouble looking it up 😅)

@alexcrichton
Copy link
Collaborator

My thinking for @unstable and @deprecated is that in my experience in Rust if something stays as @unstable for too long but it's widely used then it's defacto-stable and a transition plan of sorts is needed for the eventual replacement. IIRC there's been #[deprecated] and #[unstable] APIs in Rust, and this was intended to mirror that. It's definitely a bit of a niche use case for sure.

Also I wasn't sure what you meant by "stick in the sand" here

Oh that's just me mixing up idioms and producing nonsense, you can ignore me.

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Jul 23, 2024

Okay, great - that's a good enough motivation for me. I think that means that once we've merged bytecodealliance/wasm-tools#1687 we should be ready to merge this too!

edit: modulo removing message from this proposal - will do that now!

design/mvp/WIT.md Outdated Show resolved Hide resolved
github-merge-queue bot pushed a commit to bytecodealliance/wasm-tools that referenced this pull request Jul 23, 2024
This is intended to correspond with WebAssembly/component-model#377.

Closes #1683
Co-Authored-By: Alex Crichton <alex@alexcrichton.com>
@yoshuawuyts yoshuawuyts merged commit de2bc23 into WebAssembly:main Jul 25, 2024
1 check passed
@yoshuawuyts yoshuawuyts deleted the deprecated-gate branch July 25, 2024 13:09
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.

Support @deprecated gates in WIT
3 participants