Skip to content

Mandatory fileset option is not documented #413

@gnull

Description

@gnull

I had a long standing issue being unable to compile my cabal project with haskell-flake.

After some trial and error, I discovered that haskell-flake requires the fileset option to include the project's cabal file, like in the template:

https://github.com/srid/haskell-template/blob/807aae5c6e6dc502415a60ecf9bb48ae09b0e1f8/nix/modules/flake/haskell.nix#L17

If the cabal file is not in it (or fileset is not set at all), haskell-flake seems to fail to discover the dependencies from cabal file. It also seems to ignore what I put in haskellProjects.default.packages when cabal file is not in fileset.

Given how critical fileset is to get right, could we do the following:

  1. Document it in https://community.flake.parts/haskell-flake as well as feature it in the README example. Ideally, it should be somewhere one can't miss it.

    Even though it is documented by example in the template that is provided, this does not clearly define the option's semantics. Also, the current documentation does not suit users who may not be using the template, there's simply no way they can discover that this mandatory option exists.

  2. Issue a warning or error when cabal file is ignored due to not being included in fileset. I don't know which of the two is more appropriate, but I feel that quietly ignoring a situation where user is likely to be misunderstanding what is going on is suboptimal.

I could draft a documentation PR for 1 if someone tells me what is the semantics of fileset and cabal file being in it (and whether my guess above is correct).

Ivan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions