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

Deprecate field-key in favor of field-name #127

Merged
merged 10 commits into from
Aug 21, 2024

Conversation

yoshuawuyts
Copy link
Member

Closes #107.

This deprecates field-key in favor of field-name using the @deprecated attribute in WIT. This is the first deprecation we're running in WASI, making this the first field test of it in our tooling. The way I've implemented the type change is by doing the following:

type field-name = field-key;
type field-key = string;

I don't know WIT's type system well enough to know whether I could instead just have written:

type field-name = string;

This PR also catches a case for #117 that #121 missed: only the 0.3.0-draft APIs had their prose text updated about casing. That seemed to be on accident - and since we're touching the field-key API's text anyway, that seemed like something easy to include here.

Thanks!

The PR updating this only caught the 0.3-draft APIs, presumably by accident. Including it in this change since we're touching the header names already.
@yoshuawuyts
Copy link
Member Author

Changing this to a draft PR: wit-abi-up-to-date needs to be updated to the latest version of wasm-tools first. Once we've done that we can re-run CI.

@yoshuawuyts yoshuawuyts marked this pull request as draft August 14, 2024 12:59
@yoshuawuyts
Copy link
Member Author

This needs WebAssembly/wit-abi-up-to-date#28 to land and be published so we can update wit-tools to a newer version, fixing CI.

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.

Thanks! Cool to see @deprecated in action.

wit-0.3.0-draft/types.wit Outdated Show resolved Hide resolved
wit-0.3.0-draft/types.wit Outdated Show resolved Hide resolved
@yoshuawuyts yoshuawuyts marked this pull request as ready for review August 21, 2024 14:47
@yoshuawuyts
Copy link
Member Author

Realized just now that we'd set the @deprecated gate to point to version 0.2.1 which has already shipped, rather than 0.2.2 which is the next release. It seems like we missed that in review.

wit-abi-up-to-date has been updated to allow the wasm-tools version to be set as a parameter. Which means CI is now passing for this PR. Going to go ahead and merge this! Thanks all!

@yoshuawuyts yoshuawuyts merged commit f45069d into WebAssembly:main Aug 21, 2024
1 check passed
@yoshuawuyts yoshuawuyts deleted the deprecate-field-key branch August 21, 2024 14:58
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.

Terminology: "field key" vs "field name"
2 participants