Skip to content

Ignore name in resolver.yaml files #1678

Open
@WorldSEnder

Description

@WorldSEnder

StackSnapshot includes a Name that stack does not require to be present in resolver.yaml files - nor is it used later on by Stack2nix.

https://github.com/input-output-hk/nix-tools/blob/c9c10ab889a7b7f2f5f4bb71e8786fc01d49e53e/lib/Stack2nix/Stack.hs#L137-L146

https://github.com/input-output-hk/nix-tools/blob/595ca11bfe79fd929c1a18e07a4fdc0e3363eb82/lib/Stack2nix/External/Resolve.hs#L46

This currently fails with the uninformative error

building '/nix/store/bchydzmscf902zzf7wlgnq5949px2w0s-stack-repos.drv'...
substituteStream(): WARNING: pattern '# nix-sha256:' doesn't match anything in file 'stack.yaml'
stack-repos: AesonException "Error in $: key "name" not found"
CallStack (from HasCallStack):
error, called at lib/Stack2nix/External/Resolve.hs:45:25 in nix-tools-0.1.0.0-6VebEDwtbke5HHKMYxPZB7:Stack2nix.External.Resolve
builder for '/nix/store/bchydzmscf902zzf7wlgnq5949px2w0s-stack-repos.drv' failed with exit code 1
error: build of '/nix/store/bchydzmscf902zzf7wlgnq5949px2w0s-stack-repos.drv' failed
(use '--show-trace' to show detailed location information)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions