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

Improved to-directory-tree #2437

Merged
merged 12 commits into from
Sep 20, 2022

Conversation

mmhat
Copy link
Collaborator

@mmhat mmhat commented Aug 14, 2022

  • Added a new command line flag --allow-path-separators for the
    to-directory-tree command. This flag controls whether path separators
    in names are allowed. In that case we also create all parent
    directories of a file.
  • Added a new way building directory trees using a fixpoint approach.
    Using it allows one to set the user, group and permissions (for some OS).
    The values accepted need to have the type given in the issue description of Allow users to set ownership and permissions in to-directory-tree #2436 .
  • Added unix-compat as a new dependency of the dhall package
  • Added some tests for to-directory-tree
  • Added a FromDhall instance for Identity

Fixes #2436
Fixes #1633

@mmhat
Copy link
Collaborator Author

mmhat commented Aug 14, 2022

If this one gets merged, I also suggest we add the types of the issue description of #2436 to the Dhall prelude.

@mmhat
Copy link
Collaborator Author

mmhat commented Aug 14, 2022

Not sure what happened here: Hydra failed very early and I have no clue what went wrong...

@sjakobi
Copy link
Collaborator

sjakobi commented Aug 15, 2022

Not sure what happened here: Hydra failed very early and I have no clue what went wrong...

Just an instance of #2313. I've restarted the build.

@mmhat
Copy link
Collaborator Author

mmhat commented Aug 15, 2022

@sjakobi It failed again. How can I trigger a re-run of the job?

@mmhat mmhat force-pushed the 1633-improved-to-directory-tree branch from 95087fa to d712f3a Compare August 15, 2022 15:10
@mmhat
Copy link
Collaborator Author

mmhat commented Aug 15, 2022

Ok, this is blocked by #2313 for now 😞

@mmhat mmhat force-pushed the 1633-improved-to-directory-tree branch from e719b27 to 3953d23 Compare August 16, 2022 10:10
Copy link
Collaborator

@Gabriella439 Gabriella439 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a few comments

Also, would it be possible to create a small Dhall package within this repository for working with the new tree type?

dhall/src/Dhall/DirectoryTree.hs Outdated Show resolved Hide resolved
dhall/src/Dhall/DirectoryTree.hs Outdated Show resolved Hide resolved
dhall/src/Dhall/DirectoryTree.hs Outdated Show resolved Hide resolved
dhall/src/Dhall/DirectoryTree.hs Show resolved Hide resolved
@mmhat
Copy link
Collaborator Author

mmhat commented Sep 7, 2022

@Gabriella439 I added a commented example to the examples directory of the dhall package. I also think that adding the used types and some useful functions/constants to the Dhall Prelude; What do you think?

@Gabriella439
Copy link
Collaborator

Oh yeah, you can try to add it to the Prelude. At first I was a bit hesitant to add a type that is a bit specific to the Haskell implementation, but we actually already do that in at least one other place in the Prelude, which Prelude.JSON.Nesting: https://store.dhall-lang.org/Prelude-v21.1.0/JSON/Nesting.dhall.html

mmhat and others added 11 commits September 20, 2022 23:37
 * Added a new command line flag --allow-path-separators for the
   to-directory-tree command. This flag controls whether path separators
   in names are allowed. In that case we also create all parent
   directories of a file.
 * Added a new way building directory trees using a fixpoint approach.
   This method allows one to set the user, group and permissions on some
   OS.
 * Added unix-compat as a new dependency of the dhall package
Also fixed a minor bug in `Dhall.DirectoryTree.hasMode`.
Also added FromDhall instance for Identity.
Also updated Haddocks of Dhall.DirectoryTree.
Co-authored-by: Gabriella Gonzalez <Gabriel439@gmail.com>
Co-authored-by: Gabriella Gonzalez <Gabriel439@gmail.com>
@mmhat mmhat force-pushed the 1633-improved-to-directory-tree branch from ff88ae9 to faf01b0 Compare September 20, 2022 21:42
@mmhat mmhat merged commit 267cae1 into dhall-lang:master Sep 20, 2022
@mmhat mmhat deleted the 1633-improved-to-directory-tree branch September 20, 2022 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants