Skip to content

Discard string context when using antiquoted string as attrset key #1910

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

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

michaelpj
Copy link
Collaborator

This manifested in practice because I was trying to do something like
this:

repository cardano-haskell-packages:
  url: file:${CHaP}
  secure: True

which gave me errors about not being allowed to have string context. We
do actually need the string context (otherwise we end up not depending
on the repository, and the sandbox prevents us from looking at it!), so
we have to be careful about where to discard. The simplest thing is to
discard where it's needed: as we create the attrset key.

This manifested in practice because I was trying to do something like
this:
```
repository cardano-haskell-packages:
  url: file:${CHaP}
  secure: True
```
which gave me errors about not being allowed to have string context. We
do actually need the string context (otherwise we end up not depending
on the repository, and the sandbox prevents us from looking at it!), so
we have to be careful about where to discard. The simplest thing is to
discard where it's needed: as we create the attrset key.
@hamishmack
Copy link
Collaborator

Two failing tests are also broken in master (building dwarf support in recent GHC cases Output limit exceeded error in hydra).

@michaelpj michaelpj merged commit f2ad286 into master Apr 11, 2023
@iohk-bors iohk-bors bot deleted the mpj/discard-a-bit-of-string-context branch April 11, 2023 09:58
andreabedini added a commit to IntersectMBO/cardano-haskell-packages that referenced this pull request Apr 14, 2023
After #200 we started seeing CI failures including messages like "source not available" or "don't know how to build these paths".

AFAIU these could be consequence of the changes in input-output-hk/haskell.nix#1915 and/or input-output-hk/haskell.nix#1910.

To try to unblock this I am a adding the `--fallback` option to nix [1] which allows nix to build a derivation that fails the substitution. 🤞 

[1] https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-fallback
lehins pushed a commit to IntersectMBO/cardano-haskell-packages that referenced this pull request Apr 14, 2023
* Release consensus 0.4

* Try to work around nix failures with --fallback

After #200 we started seeing CI failures including messages like "source not available" or "don't know how to build these paths".

AFAIU these could be consequence of the changes in input-output-hk/haskell.nix#1915 and/or input-output-hk/haskell.nix#1910.

To try to unblock this I am a adding the `--fallback` option to nix [1] which allows nix to build a derivation that fails the substitution. 🤞 

[1] https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-fallback

* Revert "Rework builder to work with new haskell.nix (#200)"

This reverts commit 408c4f4.

---------

Co-authored-by: Andrea Bedini <[email protected]>
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