-
Notifications
You must be signed in to change notification settings - Fork 409
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
validate target argument #484
Conversation
This is a very helpful addition! A few quick things I noticed:
|
@danwilhelm checking for buildmode was already there: wasm-pack/src/command/build.rs Lines 55 to 65 in 8af4002
|
Sorry I was unclear! In my comment, the first link points to the mode parameter in TestOptions. I believe the default value and help string there should mirror the one changed in this PR (ie remove the default value "normal" and add "force" to the help string). In the second link, as you point out, testing for Build Mode is already there. The Issue this PR addresses was that when an invalid argument is passed, the valid options are not displayed. Instead of bailing with 'Unknown build option', it could indicate that valid options are no-install, normal, and force. |
Issue rustwasm#484. PR392 inadvertantly replaced the `login` interactive process spawner with `child::run`, which is hard-coded to buffer stdout/stderr. This caused `login` to become essentially unusable; the user could no longer see interactive input prompts or error messages displayed by `npm adduser`. The code was not directly reverted because the previous version: 1. Returned Error instead of failure::Error. (Updated to use `bail!`, which is consistent with `publish`.) 2. Displayed all stderr only upon exit, rather than interactively displaying it. This led to repeated interactive prompts without informing the user why. (Updated to use `status()` which inherits stdin/stdout/stderr by default.) 3. Did not provide logging. (Now duplicates the logging in `child::run`.)
this seems to have a bunch of failures on appveyor-- a large number that seems disproportionate to the change here:
@csmoe do you have a windows computer to test this locally? if not perhaps @steveklabnik ? i would be surprised if this was all from this incredibly small change... |
@ashleygwilliams I have only one linux machine but i'll recheck the failed test cases. |
i'm gonna restart the build- perhaps it was a weird flake on appveyors part |
looks like it was a fluke! i think this is good to go and we can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you so much!
Issue #484. PR392 inadvertantly replaced the `login` interactive process spawner with `child::run`, which is hard-coded to buffer stdout/stderr. This caused `login` to become essentially unusable; the user could no longer see interactive input prompts or error messages displayed by `npm adduser`. The code was not directly reverted because the previous version: 1. Returned Error instead of failure::Error. (Updated to use `bail!`, which is consistent with `publish`.) 2. Displayed all stderr only upon exit, rather than interactively displaying it. This led to repeated interactive prompts without informing the user why. (Updated to use `status()` which inherits stdin/stdout/stderr by default.) 3. Did not provide logging. (Now duplicates the logging in `child::run`.)
Closes #483