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

Remove modes from Preview 2 spec #139

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Remove modes from Preview 2 spec #139

merged 2 commits into from
Nov 10, 2023

Conversation

pchickey
Copy link
Contributor

@pchickey pchickey commented Nov 8, 2023

We believe there is value in supporting file modes for many applications, but
for the sake of shipping Preview 2, we are out of time to implement these
methods and test a a cross platform implementation of these in two separate
engines.

These functions may come back as part of an additional filesystem interface in
a post Preview 2 patch version 0.2.n, or in Preview 3 or beyond. Until then,
their design is still in the git history.

We believe there is value in supporting file modes for many applications, but
for the sake of shipping Preview 2, we are out of time to implement these
methods and test a a cross platform implementation of these in two separate
engines.

These functions may come back as part of an additional filesystem interface in
a post Preview 2 patch version 0.2.n, or in Preview 3 or beyond. Until then,
their design is still in the git history.
pchickey pushed a commit to bytecodealliance/wasmtime that referenced this pull request Nov 8, 2023
@pchickey
Copy link
Contributor Author

pchickey commented Nov 9, 2023

Copying this relevant discussion in from bytecodealliance/wasmtime#7510 :

@alexcrichton alexcrichton 3 hours ago
Question on this, if we know we want to add this in the future should we be trying to future-proof this function? For example we could add an options: option with a currently empty resource open-options or something like that.

Alternatively we could add a feature to the component model and WIT for something like keyword arguments with defaults. That's a much longer- term vision though.

@pchickey pchickey 34 minutes ago
I believe that we can eliminate the modes parameter here and let open-at continue to do the reasonable default behavior, and then when users of the re-introduced modes stuff want to opt into a non-default behavior for modes, we can expose a new open-at-modes function that has the additional argument. Then when it comes time to make a breaking change in preview 3 we can consolidate down to just one open-at with mode arguments.

We could get fancier than that, but I expect the above will work fine without introducing much complexity.

@pchickey pchickey merged commit 977377b into main Nov 10, 2023
1 check passed
@pchickey pchickey deleted the pch/remove_modes branch November 10, 2023 22:39
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.

2 participants