-
Notifications
You must be signed in to change notification settings - Fork 214
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
List dependencies in "post-order" #1539
Conversation
Related to https://github.com/dhall-lang/dhall-lang/issues/823 This lists dependencies starting from the leaves and concluding with the root import, same as how `nix-store --query --requisites` does Example output: ```bash $ dhall resolve --no-cache --transitive-dependencies <<< 'https://prelude.dhall-lang.org/package.dhall' https://prelude.dhall-lang.org/Bool/and https://prelude.dhall-lang.org/Bool/build https://prelude.dhall-lang.org/Bool/even https://prelude.dhall-lang.org/Bool/fold https://prelude.dhall-lang.org/Bool/not https://prelude.dhall-lang.org/Bool/odd https://prelude.dhall-lang.org/Bool/or https://prelude.dhall-lang.org/Bool/show https://prelude.dhall-lang.org/Bool/package.dhall https://prelude.dhall-lang.org/Double/show https://prelude.dhall-lang.org/Double/package.dhall https://prelude.dhall-lang.org/Function/compose https://prelude.dhall-lang.org/Function/package.dhall https://prelude.dhall-lang.org/Integer/show https://prelude.dhall-lang.org/Integer/toDouble https://prelude.dhall-lang.org/Integer/package.dhall https://prelude.dhall-lang.org/List/all https://prelude.dhall-lang.org/List/any https://prelude.dhall-lang.org/List/build https://prelude.dhall-lang.org/List/concat https://prelude.dhall-lang.org/List/concatMap https://prelude.dhall-lang.org/List/default https://prelude.dhall-lang.org/List/empty https://prelude.dhall-lang.org/List/filter https://prelude.dhall-lang.org/List/fold https://prelude.dhall-lang.org/List/generate https://prelude.dhall-lang.org/List/head https://prelude.dhall-lang.org/List/indexed https://prelude.dhall-lang.org/List/iterate https://prelude.dhall-lang.org/List/last https://prelude.dhall-lang.org/List/length https://prelude.dhall-lang.org/List/map https://prelude.dhall-lang.org/List/null https://prelude.dhall-lang.org/List/partition https://prelude.dhall-lang.org/List/replicate https://prelude.dhall-lang.org/List/reverse https://prelude.dhall-lang.org/List/shifted https://prelude.dhall-lang.org/List/unzip https://prelude.dhall-lang.org/List/package.dhall https://prelude.dhall-lang.org/Location/Type https://prelude.dhall-lang.org/Location/package.dhall https://prelude.dhall-lang.org/Map/Type https://prelude.dhall-lang.org/Map/Entry https://prelude.dhall-lang.org/Map/empty https://prelude.dhall-lang.org/Map/keyText https://prelude.dhall-lang.org/Map/keyValue https://prelude.dhall-lang.org/Map/keys https://prelude.dhall-lang.org/Map/map https://prelude.dhall-lang.org/Map/values https://prelude.dhall-lang.org/Map/package.dhall https://prelude.dhall-lang.org/Monoid https://prelude.dhall-lang.org/Natural/build https://prelude.dhall-lang.org/Natural/enumerate https://prelude.dhall-lang.org/Natural/even https://prelude.dhall-lang.org/Natural/fold https://prelude.dhall-lang.org/Natural/isZero https://prelude.dhall-lang.org/Natural/odd https://prelude.dhall-lang.org/Natural/product https://prelude.dhall-lang.org/Natural/sum https://prelude.dhall-lang.org/Natural/show https://prelude.dhall-lang.org/Natural/toDouble https://prelude.dhall-lang.org/Natural/toInteger https://prelude.dhall-lang.org/Natural/lessThanEqual https://prelude.dhall-lang.org/Natural/greaterThanEqual https://prelude.dhall-lang.org/Natural/lessThan https://prelude.dhall-lang.org/Natural/equal https://prelude.dhall-lang.org/Natural/greaterThan https://prelude.dhall-lang.org/Natural/min https://prelude.dhall-lang.org/Natural/max https://prelude.dhall-lang.org/Optional/map https://prelude.dhall-lang.org/Natural/listMin https://prelude.dhall-lang.org/Natural/listMax https://prelude.dhall-lang.org/Natural/sort https://prelude.dhall-lang.org/Natural/subtract https://prelude.dhall-lang.org/Natural/package.dhall https://prelude.dhall-lang.org/Optional/all https://prelude.dhall-lang.org/Optional/any https://prelude.dhall-lang.org/Optional/build https://prelude.dhall-lang.org/Optional/concat https://prelude.dhall-lang.org/Optional/default https://prelude.dhall-lang.org/Optional/filter https://prelude.dhall-lang.org/Optional/fold https://prelude.dhall-lang.org/Optional/head https://prelude.dhall-lang.org/Optional/last https://prelude.dhall-lang.org/Optional/length https://prelude.dhall-lang.org/Optional/null https://prelude.dhall-lang.org/Optional/toList https://prelude.dhall-lang.org/Optional/unzip https://prelude.dhall-lang.org/Optional/package.dhall https://prelude.dhall-lang.org/JSON/Type https://prelude.dhall-lang.org/JSON/Nesting https://prelude.dhall-lang.org/JSON/Tagged https://prelude.dhall-lang.org/JSON/keyText https://prelude.dhall-lang.org/JSON/keyValue https://prelude.dhall-lang.org/JSON/string https://prelude.dhall-lang.org/JSON/number https://prelude.dhall-lang.org/JSON/object https://prelude.dhall-lang.org/JSON/array https://prelude.dhall-lang.org/JSON/bool https://prelude.dhall-lang.org/JSON/null https://prelude.dhall-lang.org/Text/concatMapSep https://prelude.dhall-lang.org/JSON/render https://prelude.dhall-lang.org/JSON/package.dhall https://prelude.dhall-lang.org/Text/concat https://prelude.dhall-lang.org/Text/concatMap https://prelude.dhall-lang.org/Text/concatSep https://prelude.dhall-lang.org/Text/default https://prelude.dhall-lang.org/Text/defaultMap https://prelude.dhall-lang.org/Text/show https://prelude.dhall-lang.org/Text/package.dhall https://prelude.dhall-lang.org/XML/Type https://prelude.dhall-lang.org/XML/attribute https://prelude.dhall-lang.org/XML/render https://prelude.dhall-lang.org/XML/element https://prelude.dhall-lang.org/XML/leaf https://prelude.dhall-lang.org/XML/text https://prelude.dhall-lang.org/XML/emptyAttributes https://prelude.dhall-lang.org/XML/package.dhall https://prelude.dhall-lang.org/package.dhall ```
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.
Nice! 👍
It might be good to document this behaviour – I'm not sure which place would be best. In the usage info, on ListTransitiveDependencies
?
... as suggested by @sjakobi
Thanks for responding so fast! Just a quick look - given that |
@retnuh: I believe it will not reinsert the same import because it will be a cache hit the second time it attempts to import it |
|
@Gabriel439 I have pushed a fix for dhall-lsp-server to your branch, so this can (hopefully) get merged. |
@sjakobi: Thank you! Sorry, I've been busy preparing for a talk over the last week |
No worries! You're welcome! :) |
Related to https://github.com/dhall-lang/dhall-lang/issues/823
This lists dependencies starting from the leaves and concluding with the root
import, same as how
nix-store --query --requisites
doesExample output: