-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added support to indicate node.js architecture on Windows (dcodeIO#8) #9
Open
javihernandez
wants to merge
5
commits into
dcodeIO:master
Choose a base branch
from
javihernandez:input-arch-field
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8b8f16a
Added support to indicate node.js architecture on Windows (dcodeIO#8)
javihernandez 7358d3c
Updated README.md (dcodeIO#8)
javihernandez 4aa073e
Addressed review comments (dcodeIO#8)
javihernandez 67539e1
Throwing if node-arch is provided on linux and macos (dcodeIO#8)
javihernandez c4c8d5b
Catch the errors and fail for real when node-arch is provided (dcodeI…
javihernandez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should this throw if provided on a different platform?
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.
Good question. In this particular case, node-arch is only being processed on Windows systems and I marked the input field as "Windows only" in the README file in an attempt to avoid any confusion between nvm and nvm-windows.
As an option, we can move this out of the platform check and indicate that node-arch has no effect on *nix systems when provided, but IMHO, throwing doesn't look like a good idea to me. But of course, I'm happy to hear your thoughts on this.
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.
I can see the benefit of silently ignoring it, when the user's intention is "only respect this on windows".
However, if the user's intention is "force this architecture", they might end up running non-windows tests on a different architecture than intended, which could mask a lot of problems.
Since it's impossible to know the user's intention, it seems to me like the safer approach is to throw rather than silently ignore the invalid option.
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.
Sure, I see your point, however, can you elaborate a bit more on:
I'm not sure I follow you. How the users might end up doing such thing if the option is ignored on non-windows platforms?
I just want to understand this better, that's all.
Oh, and throwing on non-windows platforms should be as easy as adding a core.setFailed when node-arch has been provided, @dcodeIO would you be okay with it?
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.
If a user's intention is to ensure their project works on 32 bit and 64 bit machines, and in fact their non-windows tests are only running on 64 bit machines, then their 32-bit users on non-windows machines aren't being covered - the testing is a false positive.