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

command to print spago.dhall sources as JSON #276

Closed
justinwoo opened this issue Jun 16, 2019 · 7 comments

Comments

@justinwoo
Copy link
Collaborator

commented Jun 16, 2019

given

{ sources =
    [ "src/**/*.purs", "test/**/*.purs" ]
, name = -- ...
}
 [ "src/**/*.purs", "test/**/*.purs" ]

(but this also needs to normalize the expression first)

@justinwoo justinwoo added the feature label Jun 16, 2019

@justinwoo justinwoo changed the title print spago.dhall sources as JSON command print spago.dhall sources as JSON Jun 16, 2019

@justinwoo justinwoo changed the title command print spago.dhall sources as JSON command to print spago.dhall sources as JSON Jun 16, 2019

@f-f

This comment has been minimized.

Copy link
Member

commented Jun 16, 2019

@justinwoo could you depend on dhall-to-json? Then you could do

dhall-to-json <<< "(./spago.dhall).sources"
@justinwoo

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 16, 2019

to be confirmed

@justinwoo

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 17, 2019

i had to use a mess of writing to stdin on a child process as a result, since there's no --file arg in dhall-to-json, and using --file just complains about not being able to resolve

@justinwoo

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 17, 2019

maybe less important with #274

@f-f

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

@justinwoo the --file issue is fixed in master, fix went in with dhall-lang/dhall-haskell#1004, so it should work properly with the upcoming release

@f-f

This comment has been minimized.

Copy link
Member

commented Jun 22, 2019

@justinwoo would the solution proposed in #287 work for you?

@justinwoo

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 22, 2019

maybe it's okay, you can close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.