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 take-headers methods for incoming messages and bump package version to 0.2.1-draft #103

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

acfoltzer
Copy link
Contributor

Closes #102. See discussion in that issue for the motivation and design of this change.

wit/types.wit Outdated
@@ -244,7 +244,23 @@ interface types {

/// Gives the `incoming-body` associated with this request. Will only
/// return success at most once, and subsequent calls will return error.
///
/// Deprecated in favor of `into-parts`.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure we need to mark consume as deprecated in 0.2.1 -- if all you want is to do is read the body stream, it's a reasonable method to call (and perhaps a bit more efficient; not forcing you to copy strings you don't want). Note that 0.3 is free and expected to make big breaking changes, and if you check out #101, you can see a sketch of how it might look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these notes in 55a4754

wit/types.wit Outdated Show resolved Hide resolved
Closes WebAssembly#102. See discussion in that issue for the motivation and design of this change.
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.

Looks good to me. It'd be good to hear if this makes sense to others too.

Assuming it does, before merging, we'll need to answer the process question of how we want to manage post-0.2 additions in the WIT in the individual proposal repos post-0.2. I forget what we settled on. In particular, once the contents of the proposal repo no longer match what's in the 0.2 snapshot in the wasi repo, should we first change all the versions in all the WITs in this repo to something other than 0.2.0, say, 0.2.1-ephemeral, so that we're not falsely claiming that our take-headers is part of 0.2.0?

Any thoughts @sunfishcode @ricochet @pchickey?

@pchickey
Copy link
Contributor

I believe we should change the version to be 0.2.1-draft as part of this PR.

@acfoltzer
Copy link
Contributor Author

@pchickey I'm guessing we'll want to stick with 0.2.0 for the dependencies for now, and just change to package wasi:[email protected] in proxy.wit?

@pchickey
Copy link
Contributor

Yes, we should only change the version at the wasi:http package declaration in proxy.wit.

@acfoltzer acfoltzer changed the title Add static into-parts for incoming messages; deprecate consume Add take-headers methods for incoming messages and bump package version to 0.2.1-draft Feb 23, 2024
@acfoltzer
Copy link
Contributor Author

Got it; updated the version and also edited the PR title to better reflect the new approach

@acfoltzer
Copy link
Contributor Author

Unsure why the CI check is failing here; I have wit-bindgen-cli 0.17.0 installed as does the Actions script, but the --check test is failing on the output I've produced.

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.

Methods needed to get owned headers out of requests and responses
3 participants