-
Notifications
You must be signed in to change notification settings - Fork 217
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
Bump to cardano-node alonzo-white-1.4 #2801
Conversation
Don't forget to make a PR from your branch on cardano-haskell. |
1c71306
to
e5d73d7
Compare
e5d73d7
to
73ecf8b
Compare
Hm, hydra was fully green before I bumped optparse-applicative again... 👀 Reverting |
7bbf540
to
c5c2a19
Compare
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.
LGTM, thanks!
readGolden :: FilePath -> IO (Either IOError Text) | ||
readGolden f = try (TIO.readFile f) | ||
readGolden f | ||
| os == "mingw32" = try $ TIO.readFile (f <> ".win") <|> TIO.readFile f |
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.
There is a helper function Test.Utils.Platform.isWindows
that you can use here.
The Alternative
instance of IO
won't work as we need here.
For example:
λ import UnliftIO.Exception
λ try (throwString "bad" <|> putStrLn "good") :: IO (Either SomeException ())
Left UnliftIO.Exception.throwString called with:
bad
Called from:
throwString
( <interactive>: 8 : 6 in interactive:Ghci4 )
λ
I have pushed a fix.
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.
🤔
λ> try (throwString "bad" <|> putStrLn "good") :: IO (Either SomeException ())
Left UnliftIO.Exception.throwString called with:
bad
Called from:
throwString (<interactive>:21:6 in interactive:Ghci4)
λ> try (throwIO (userError "bad") <|> putStrLn "good") :: IO (Either SomeException ())
good
Right ()
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.
The Alternative instance of IO won't work as we need here.
I doubt that was a problem though I don't understand the above behaviour, but the other changes in your fix look fair enough.
|
||
Example: | ||
[0;1m$ unit.exe recovery-phrase generate \[0m | ||
[0;1m| unit.exe key from-recovery-phrase Icarus[0m |
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.
Shouldn't these golden files have newlines at the end? Our CLI does print a final newline.
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 don't think they used to have: https://github.com/input-output-hk/cardano-wallet/blob/e4503c84811713cc66d857a32763e29e2994127a/lib/cli/test/unit/Cardano/CLISpec.hs#L131-L139
Perhaps the CLI would print an extra newline, but the string we get from optparse-applicative in CLISpec
does not.
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.
OK. I like newlines at the end of text files, so I added a golden post-processing step to do that.
2c4df37
to
0713d13
Compare
For more convenient viewing, diffing, and regeneration.
0713d13
to
6168f4c
Compare
The commit ordering of
I've now rebased. |
OK fair enough. By ordering commits like that you have shown that the layout from this forked optparse-applicative is not as good as the previous formatting. I added a fix to make the cli unit tests on windows pass. |
d427bea
to
76e3a16
Compare
Thanks |
2801: Bump to cardano-node alonzo-white-1.4 r=Anviking a=Anviking # Issue Number ADP-1062 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Bump to alonzo-white-1.4 - [x] Figure out how to fix the CLI tests - [x] Fix any newly appearing CI errors # Comments input-output-hk/cardano-haskell#53 input-output-hk/cardano-haskell#54 <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
And also make test failure messages nicer.
Canceled. |
The cli unit tests were failing on Windows. I have added a fix for that. |
bors r+ |
2801: Bump to cardano-node alonzo-white-1.4 r=Anviking a=Anviking # Issue Number ADP-1062 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Bump to alonzo-white-1.4 - [x] Figure out how to fix the CLI tests - [x] Fix any newly appearing CI errors # Comments input-output-hk/cardano-haskell#53 input-output-hk/cardano-haskell#54 <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
Build failed: |
bors r+ |
2801: Bump to cardano-node alonzo-white-1.4 r=rvl a=Anviking # Issue Number ADP-1062 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Bump to alonzo-white-1.4 - [x] Figure out how to fix the CLI tests - [x] Fix any newly appearing CI errors # Comments input-output-hk/cardano-haskell#53 input-output-hk/cardano-haskell#54 <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
Build failed: |
bors r+ |
Build succeeded: |
Issue Number
ADP-1062
Overview
Comments
input-output-hk/cardano-haskell#53
input-output-hk/cardano-haskell#54