-
Notifications
You must be signed in to change notification settings - Fork 15
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
stub wasm32-u-u target ? #9
Comments
Yes, I think a stub that returns false makes sense. I'll add that. |
Also for
|
Also, some calls are already stubbed. The issue will be making the dependencies platform specific. @sunfishcode would you like me to take a stab at this? |
I've just release io-lifetimes 1.0.3 which avoids defining things that don't work on wasm32-unknown-unknown, which fixes the immediate compilation errors. Looking at this more closely though, this makes it impossible to support is-terminal's current API on wasm32-unknoown-unknown because is-terminal expects a handle argument, and there are no handle types defined on wasm32-unknown-unknown. I'm considering adding additional functions to is-terminal, such as |
Ah, I was mistaken above. We can implement is-terminal for Stdout and similar types; I've now submitted #10 to implement this. |
Cool. It all builds now 👍 thanks! |
Re: clap-rs/clap#4510
Considering
is_terminal
is seen as direct migration fromatty
-When people are migrating off
atty
they will get this error under wasm32-u-u if there is callpath tois_terminal
:Would it be feasible to stub out wasm32-u-u that it still builds and provides
false
tois_terminal
?Or at least if the dependency is there it does not try to build stuff in wasm32-u-u that will fail to compile ?
Considering the below -
Even if one stamps out the calls to
is_terminal
thenio-lifetimes
doesn't build at all if it's present in the dependenciesSometimes the dependencies come via default features as in case of
clap
which made it pretty complicated to remove -Yeah I know wasm32-u-u doesn't have terminal but would it be feasible to provide stubs for it to ease migration ?
Or at least cfg gate some of it out @
target_family = "wasm", target_os = "unknown"
?Cheers
The text was updated successfully, but these errors were encountered: