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

Fix test suite in response to … #1275

Merged
merged 2 commits into from
Sep 15, 2019
Merged

Fix test suite in response to … #1275

merged 2 commits into from
Sep 15, 2019

Conversation

sjakobi
Copy link
Collaborator

@sjakobi sjakobi commented Sep 3, 2019

@sjakobi
Copy link
Collaborator Author

sjakobi commented Sep 6, 2019

What would be a good platform-independent way to ensure that we don't use the (semantic) cache when resolving imports?

  • Point XDG_CACHE_HOME (or its Windows equivalent) at a fresh temporary directory?
  • Bake a new option into Dhall.Import.loadWith that let's us skip the (semantic) cache?

We could probably reuse the code for the latter alternative for a mode that lets users check their hash-protected imports…

@Gabriella439
Copy link
Collaborator

@sjakobi: So I think the right solution in the long-term is a variation on integrity checks which don't α-normalize the protected import, but in the short term we could add a --no-cache flag

@sjakobi
Copy link
Collaborator Author

sjakobi commented Sep 6, 2019

in the short term we could add a --no-cache flag

Such a flag would also be useful to check whether hash-protected imports have changed – otherwise there's no warning.

sjakobi added a commit that referenced this pull request Sep 7, 2019
When enabled, we handle protected imports as if the semantic cache was
empty:
  * Protected imports are resolved again, downloaded or read from
    the filesystem as necessary.
  * Protected imports are β-normalized, not αβ-normalized.
  * Protected imports are checked against their SHA256 hashes,
    failing to resolve if they don't match.

Context:
#1275 (comment)
@sjakobi sjakobi mentioned this pull request Sep 7, 2019
sjakobi added a commit that referenced this pull request Sep 9, 2019
When enabled, we handle protected imports as if the semantic cache was
empty:
  * Protected imports are resolved again, downloaded or read from
    the filesystem as necessary.
  * Protected imports are β-normalized, not αβ-normalized.
  * Protected imports are checked against their SHA256 hashes,
    failing to resolve if they don't match.

Context:
#1275 (comment)
@sjakobi sjakobi changed the title WIP: Fix test suite in response to … Fix test suite in response to … Sep 14, 2019
@sjakobi sjakobi force-pushed the sjakobi/merge-type-tests branch 2 times, most recently from 6cd1bcb to 7cdb0ec Compare September 14, 2019 22:39
@mergify mergify bot merged commit fddce0b into master Sep 15, 2019
@mergify mergify bot deleted the sjakobi/merge-type-tests branch September 15, 2019 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants