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

Report imports #2575

Open
bgohla opened this issue Mar 19, 2024 · 1 comment
Open

Report imports #2575

bgohla opened this issue Mar 19, 2024 · 1 comment

Comments

@bgohla
Copy link

bgohla commented Mar 19, 2024

Is there a way for Dhall to report which files are imported?

This would be very handy when writing Makefiles.

E.g.,

dhall imports <<< "{ foo = ./bar.dhall, baz = ./words.txt as Text, boom = https://example.com/package/dhall }"

should answer with

./bar.dhall
./words.txt
@Gabriella439
Copy link
Collaborator

Sorry, for the late reply, but there is a way to do this! The dhall resolve subcommand has a few flags related to this and the one you're probably interested in is --immediate-dependencies:

$ dhall resolve --immediate-dependencies <<< "{ foo = ./bar.dhall, baz = ./words.txt as Text, boom = https://example.com/package/dhall }"
./bar.dhall
./words.txt as Text
https://example.com/package/dhall

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

No branches or pull requests

2 participants