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 freeze: Remove cache import expression before a secure freeze #2486

Merged
merged 3 commits into from Feb 1, 2023

Conversation

mmhat
Copy link
Collaborator

@mmhat mmhat commented Feb 1, 2023

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

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.

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.

None yet

2 participants