-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add a command to use master version of elm-explorations/test #592
Conversation
From Discord:
|
I wonder if this could even take an argument, so that it could be used to test locally other branches? |
@gampleman My initial assumption when hearing @harrysarson's idea was that this would later be reverted, and not a long-term flag. If it was to be longterm, I agree customizing it could be a nice addition. |
I've incorporated your feedback @lydell although I'm sure my implementation will need some more improvements. It works on my Mac machine but I haven't tried the |
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.
TODO:
- Make CI pass
- Test manually on Windows (I think
spawn.sync
throws an error rather than returning a non-zero exit code ifunzip
does not exist). EDIT: No, the approach with the exit codes works, at least on macOS. So it’s just about verifying that it works on Windows.
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 am happy to delegate detail review to others, the shape of this PR looks great!
Given this is a tool to test the new elm-explorations which should be uniform across platforms (its elm) I would think we need windows support (although it would obviously be cool to have).
I was thinking of this being something we revert, but if we end up liking I could see us building it out |
@Janiczek Let me know if you need help getting |
Hey @lydell, thanks for the review and your offer! I was a bit swamped with other work, didn't even notice your last few comments 😅 I hope to take a look at this tomorrow and get the PR into shape. |
This now works via a pair of commands:
|
@Janiczek I fixed the CI failure, but since you used your Edit: I made a pull request to your pull request: https://github.com/Janiczek/node-test-runner/pull/1 |
This is looking really good now! I finally tested on Windows, and unfortunately I ran into an error:
Not sure why that happens yet. |
I figured it out! Made another PR here: https://github.com/Janiczek/node-test-runner/pull/2/files |
Make it work on Windows
lib/Install.js
Outdated
}); | ||
|
||
// The destination stream is ended by the time it's called | ||
file.on('finish', () => resolve(fileInfo)); |
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.
We seem to resolve the promise with some data we never use here.
lib/Install.js
Outdated
@@ -117,6 +124,122 @@ function install( | |||
return 'SuccessfullyInstalled'; | |||
} | |||
|
|||
async function downloadFileNative(url, filePath) { |
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.
Maybe we should add type annotations to all new functions in this file – for parameters and return types.
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.
Went ahead and did the last final touches: https://github.com/Janiczek/node-test-runner/pull/3
One final final question 😅 What way is the easiest to verify that:
|
Replying to myself, I figured out an easy way to test: I added However, I first thought it didn’t work, because I tried with Here’s where 1.2.2 is mentioned multiple times:
EDIT: Added a check in https://github.com/Janiczek/node-test-runner/pull/3. It was easy enough. |
Good to see you figured how to test this out:
But anyways just to post my way of testing this, I've simply ran this local version of elm-test in one of my repos that had
So it's usually fine to do something like cd ~/Localhost/elm/elm-secret-sharing
../../cloned/node-test-runner/bin/elm-test # 1.2.2, works
../../cloned/node-test-runner/bin/elm-test install-unstable-test-master
../../cloned/node-test-runner/bin/elm-test # master, doesn't work
../../cloned/node-test-runner/bin/elm-test uninstall-unstable-test-master
../../cloned/node-test-runner/bin/elm-test # 1.2.2, works |
Final touches
I noticed that the intellij-elm plugin does not like when I run |
I don't use that one (I'm pretty light on Elm editor plugins) so I didn't notice 😬 |
Found the issue and made a PR: https://github.com/Janiczek/node-test-runner/pull/4 |
Install package elm-explorations/test after uninstalling master
Those auto-close comments are treacherous 😁 |
This is based on a discussion in the Incremental Elm #elm-test Discord channel.
The intent is to allow people to help us beta-test the
elm-explorations/test
2.0.0 release and use themaster
version ofelm-explorations/test
on their codebases (masqueraded as the 1.2.2 version).cc @harrysarson
vid.mp4