-
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
Added dhall package command #2487
Conversation
40fd9d3
to
6a83ebb
Compare
Sorry for the delay, but I think the command-line interface I would suggest is: $ dhall package "${DIRECTORY}" # Create a `package.dhall` in that directory from its contents
$ dhall packages "${FILES[@]}" # Create a `package.dhall` from those files if they all share the same directory, otherwise fail … possibly with an optional Another advantage of doing it this way is that you don't need to worry about computing relative paths from the input files to the output package file, so it simplifies the implementation a lot. |
@Gabriella439 Thanks for the feedback; Yes, that would indeed simplify the implementation. I am a bit hesitant to add more than one new top-level command to the CLI - especially since the two you proposed are quite similar. Why do we want to distinguish the directory/files cases anyway? However, if we were deciding to do that I'd propose: $ dhall package directory "${DIRECTORY}"
$ dhall package files "${FILES[@]}" What do you think about that? |
We require that all files are in the same directory. The package.dhall will be written to that directory.
I changed the implementation to allow only files from the same directory and it is closer to the suggested behavior now. I did not yet change the CLI as the discussion about that is ongoing. |
No idea why the tests are failing on the Hydra build. They succeed on all other runners and I can't reproduce the failure locally. |
this usually means that you need to add something to dhall-haskell/dhall/dhall.cabal Line 26 in 0f1b05c
… because the thing that the Nix build does differently is that it builds |
Fixes #1645