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

dhall package command: Added support for automatic sub-packages #2639

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

mmhat
Copy link
Collaborator

@mmhat mmhat commented Feb 8, 2025

When you pass the --recursive flag (or -r for short) to the dhall package command, then for each directory passed as an argument a sub-package is created in each subdirectory, and that sub-package is included in the (main) package in addition to the *.dhall files of that directory.

For example, for a directory structure like

subdirectory1/nesteddirectory1/
subdirectory1/nesteddirectory2/
subdirectory2/

calling dhall package --recursive . is equivalent to:

# Create sub-package for subdirectory1/nesteddirectory1/ first
cd subdirectory1/nesteddirectory1
dhall package .
# Create sub-package for subdirectory1/nesteddirectory2/ next
cd ../nesteddirectory2
dhall package .
# Create sub-package for subdirectory1/
cd ..
dhall package . */package.dhall
# Create sub-package for subdirectory2/
cd ../subdirectory2
dhall package .
# Create main package
cd ..
dhall package . */package.dhall

mmhat added 4 commits February 8, 2025 14:46
When you pass the `--recurse` flag to the `dhall package` command, then
for each directory passed as an argument a sub-package is created in
each subdirectory, and that sub-package is included in the (main) package
in addition to the *.dhall files of that directory.
@mmhat mmhat enabled auto-merge (squash) February 12, 2025 14:22
@mmhat mmhat merged commit a5ca632 into dhall-lang:main Feb 12, 2025
9 checks passed
@mmhat mmhat deleted the recursive-package branch February 12, 2025 16:24
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 this pull request may close these issues.

1 participant