Visitar URL original
dhall freeze: Remove cache import expression before a secure freeze by mmhat · Pull Request #2486 · dhall-lang/dhall-haskell · GitHub
Skip to content

dhall freeze: Remove cache import expression before a secure freeze - #2486

Merged
mmhat merged 3 commits into
dhall-lang:masterfrom
mmhat:freezing-cached-to-secure
Feb 1, 2023
Merged

mmhat merged 3 commits into
dhall-lang:masterfrom
mmhat:freezing-cached-to-secure

Conversation

@mmhat

@mmhat mmhat commented Feb 1, 2023

Copy link
Copy Markdown
Collaborator

Doing so allows us to protected imports securely that were previously only protected for caching purposes. For example, given the following Dhall file foo.dhall:

  missing
    sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b
? ./bar.dhall

Previously dhall freeze --all foo.dhall threw an "No valid imports" error as it was failing to add a hash to the missing import. With the changes in this PR freezing foo.dhall results in the following expected content of that file:

./bar.dhall
  sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b

@mmhat
mmhat requested a review from Gabriella439 February 1, 2023 15:19

@Gabriella439 Gabriella439 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perhaps add a test, but otherwise this looks great!

@mmhat
mmhat enabled auto-merge (squash) February 1, 2023 20:07
@mmhat
mmhat merged commit 0f1b05c into dhall-lang:master Feb 1, 2023
@mmhat
mmhat deleted the freezing-cached-to-secure branch February 1, 2023 20:54
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.

2 participants