-
Notifications
You must be signed in to change notification settings - Fork 213
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
cli: Use Paths module to get program version #373
Conversation
I guess one alternative to this would be to use But I think your solution is nicer, as it removes the parsing logic. |
I tested this out on my system, and the following now works: $ stack clean
$ stack ghci cardano-wallet-cli:lib GHCi loads successfully with no errors. |
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.
This looks like a nice solution. It also uses less code than the alternative, which would be to keep the existing parsing logic and use makeRelativeToProject
.
I've tested it out on my system, and didn't run into any issues.
@rvl Looks like you have some redundant
|
Thanks. I would avoid You generally don't need to repeat what Travis finds because GitHub prevents merging a PR that fails CI, and it can easily be found by clicking on the red cross. |
embedFile wasn't working for me in ghci. lib/cli/src/Cardano/CLI.hs:275:27: error: • Exception when trying to run compile-time code: ../../cardano-wallet.cabal: openBinaryFile: does not exist (No such file or directory) Code: embedFile "../../cardano-wallet.cabal" • In the untyped splice: $(embedFile "../../cardano-wallet.cabal") | 275 | let cabal = B8.unpack $(embedFile "../../cardano-wallet.cabal") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There is another easier way to get the program version (assuming all cabal files have the same version).
I've also modified the hard-coded version from the integration test scenario to use this approach instead. Neat 👍 |
The CLIs build normally, but
embedFile
wasn't working for me inghci
.There is another easier way to get the program version (assuming all cabal files have the same version).