First of all thanks to all contributors for creating such an inspiring project as dhall!
I got a couple of questions about dhall freeze
, I will enumerate all of them here as opposed to opening a few questions. I hope that’s fine.
-
a) Is there any way to
dhall freeze
in place, i.e. that the input and oputput file is the same? I tried outdhall freeze --ascii < a.dhall > a.dhall
but it results inError: Invalid input
anda.dhall
being stripped to 0 bytes. I ended up creating some temporary files but it’s a bit involved. -
b) I noticed
--inplace
mentioned somewhere but I think it was only a suggestions that never materialized - I tried--inplace
for both format and freeze and it didn’t work. Do you think that would be a useful addition? I think code formatters usually offers such funcionality as this is what you usually want to do on CI or as part of git hook. -
I noticed that
dhall freeze
also formats the code. I know it may feel natural but I was not expecting that - I wanted to only freeze imports without formatting. I am curious if that’s intentional and if that should be mentioned somehow in e.g.dhall --help
message? -
Is there some specification on how
dhall freeze
is supposed to work? I have “frozen” all my imports and rundhall freeze
once more, this time without internet connection, and it was still trying to resolve “frozen” imports. I am curious whether it means that even “frozen” (i.e. ones with hash) still can be resolved once more? -
Are there any best practises around how one should use
dhall freeze
in the codebase? Example question - I just created a new dhall file in my project and it imports Prelude. Should I copy and paste hash from previous imports in that project in order to be consistent
across files within one project?