Skip to content
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

--file option for dhall-to-yaml #1096

Closed
alexhumphreys opened this issue Jul 12, 2019 · 5 comments · Fixed by #1107
Closed

--file option for dhall-to-yaml #1096

alexhumphreys opened this issue Jul 12, 2019 · 5 comments · Fixed by #1107

Comments

@alexhumphreys
Copy link

alexhumphreys commented Jul 12, 2019

I see there's a --file option for the dhall executable, as mentioned here #1004

Would it be possible to add this to dhall-to-yaml? I find it easier to keep my import paths in order when I don't have to worry about what my current directory is when playing with STDIN.

@f-f
Copy link
Member

f-f commented Jul 12, 2019

It could also be a good idea to just bundle dhall-to-json and dhall-to-yaml into the dhall executable itself, as we already did for dhall-to-text in #1087 (AFAIK it wouldn't change much the dependency footprint, most of the dependencies are already overlapping)

@Gabriella439
Copy link
Collaborator

Gabriella439 commented Jul 12, 2019

@f-f: There should be a separate issue to discuss that, but the main issue we're running into is that the dhall package is actually doing two separate things:

  • Providing a native Haskell binding
  • Providing the dhall executable

If we could split out the native Haskell binding into a smaller separate package (i.e. dhall-core or dhall-api) and leave the dhall package for the executable (and re-exporting the Haskell API for backwards compatibility) then I'd have fewer reservations about adding extra dependencies to the dhall package. The reason why is that I'd like people using dhall as a native Haskell binding to have a smaller dependency footprint.

For example, if they were separate packages then somebody using the executable-free package to configure their Haskell program wouldn't need to depend on repline, aeson, aeson-pretty, Diff, dotgen, cborg-json, or ansi-terminal. Similarly, we could freely add dependencies like yaml to the executable package guilt-free.

@alexhumphreys: Yeah, I can add a --file option to the various executables built by the dhall-json package.

@f-f
Copy link
Member

f-f commented Jul 13, 2019

@Gabriel439 agreed! Opened #1102 to discuss this

@Gabriella439
Copy link
Collaborator

Fix is up here: #1107

@alexhumphreys
Copy link
Author

Sweet, thank you!

@mergify mergify bot closed this as completed in #1107 Jul 18, 2019
mergify bot pushed a commit that referenced this issue Jul 18, 2019
* Add `--file` option to `dhall-json` executables

Fixes #1096

* s/JSON/expression/

... as caught by @sjakobi

Co-Authored-By: Simon Jakobi <simon.jakobi@gmail.com>

* s/expression/YAML expression/

... as caught by @sjakobi

Co-Authored-By: Simon Jakobi <simon.jakobi@gmail.com>

* Change the program descriptions for `{json,yaml}-to-dhall`

... as suggested by @sjakobi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants