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

delete preopens interface from package, replace with wasi:filesystem/preopens #19

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

pchickey
Copy link
Contributor

@pchickey pchickey commented Aug 3, 2023

First, update all wit deps to their latest editions.

preopens.get-directories has a new home in wasi:filesystem/preopens.

preopens.initial-cwd needed a new home, so I put it in environment.

Pat Hickey added 2 commits August 3, 2023 14:53
wasi:filesystem/preopens is where the get-directories part of preopens
has moved to.

the initial-cwd function in preopens needed a new home, so I put it in
environment, because it seems morally similar enough.
pchickey pushed a commit to bytecodealliance/wasmtime that referenced this pull request Aug 4, 2023
pchickey pushed a commit to bytecodealliance/wasmtime that referenced this pull request Aug 8, 2023
@pchickey pchickey merged commit 7e6b4b0 into main Aug 14, 2023
@pchickey pchickey deleted the pch/preopens_are_in_filesystem branch August 14, 2023 16:29
elliottt pushed a commit to bytecodealliance/wasmtime that referenced this pull request Aug 15, 2023
github-merge-queue bot pushed a commit to bytecodealliance/wasmtime that referenced this pull request Aug 15, 2023
* rename wasi-cli-base to wasi-cli, delete `preview` package, import wasi-cli

wasi-cli import is sum of
WebAssembly/wasi-cli#19 and
WebAssembly/wasi-cli#20

* wasi impl: change bindgen arguments and mod paths from cli_base to cli

* correct name of wasi-cli deps dir to just `deps/cli/`

it turns out this isnt semantically meaningful, since the package name
is in the document itself now, but lets be consistient

* track whether stdio isatty in ctx, and impl the cli/terminal-* interfaces

* rebase fixup

* wasi wits: define the reactor adapter's world

* component adapter: fixes

* test-programs/command-tests: fix renaming cli_base to cli

* component adapter: fix manually-defined export and import names

* test harness fixes

* preview1 component adapter: fill in isatty detection

* implement isatty in preview2-to-preview1 host adapter

* test-programs: cover both when stdio isatty and not

prtest:full

* split isatty test for regular file and stdio, detect host stdio is_terminal

CI environments vary - let the test runner make sure the host process's
stdio is in fact a terminal before asserting that the guest sees it is a
terminal.

* provide an is-terminal impl for all preview2's stdio types

which means making a newtype around Stdout and Stderr instead of using
a type alias there.

and then use the is-terminal impl to fill in the isatty field in the
builder when inheriting. if you need to override it you can always
builder.stdin(stdio::stdin(), your_own_idea_of_isatty)

* finally, rename IsATTY variants to Yes and No

* Fix the reference to IsATTY::No

* more forgotten renamings

---------

Co-authored-by: Trevor Elliott <telliott@fastly.com>
eduardomourar pushed a commit to eduardomourar/wasmtime that referenced this pull request Aug 18, 2023
…e#6806)

* rename wasi-cli-base to wasi-cli, delete `preview` package, import wasi-cli

wasi-cli import is sum of
WebAssembly/wasi-cli#19 and
WebAssembly/wasi-cli#20

* wasi impl: change bindgen arguments and mod paths from cli_base to cli

* correct name of wasi-cli deps dir to just `deps/cli/`

it turns out this isnt semantically meaningful, since the package name
is in the document itself now, but lets be consistient

* track whether stdio isatty in ctx, and impl the cli/terminal-* interfaces

* rebase fixup

* wasi wits: define the reactor adapter's world

* component adapter: fixes

* test-programs/command-tests: fix renaming cli_base to cli

* component adapter: fix manually-defined export and import names

* test harness fixes

* preview1 component adapter: fill in isatty detection

* implement isatty in preview2-to-preview1 host adapter

* test-programs: cover both when stdio isatty and not

prtest:full

* split isatty test for regular file and stdio, detect host stdio is_terminal

CI environments vary - let the test runner make sure the host process's
stdio is in fact a terminal before asserting that the guest sees it is a
terminal.

* provide an is-terminal impl for all preview2's stdio types

which means making a newtype around Stdout and Stderr instead of using
a type alias there.

and then use the is-terminal impl to fill in the isatty field in the
builder when inheriting. if you need to override it you can always
builder.stdin(stdio::stdin(), your_own_idea_of_isatty)

* finally, rename IsATTY variants to Yes and No

* Fix the reference to IsATTY::No

* more forgotten renamings

---------

Co-authored-by: Trevor Elliott <telliott@fastly.com>
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