Skip to content

Multiple cabal file error can be caused by emacs #1897

@mgsloan

Description

@mgsloan

Repro: Edit a .cabal file in recent emacs, without saving. Get errors like this on build:

Multiple .cabal files found in directory /home/mgsloan/fpco/stack/: .#stack.cabal, stack.cabal

The issue is that these lock files do not change the file extension (like backup files which postpend ~), but instead prefix the filename with .#. We have two options:

  1. When there are multiple cabal files, ignore the ones with invalid names
  2. When there are multiple cabal files, ignore the ones that start with .. It is not allowed in package names anyway.

I am going to go with (2), because it is less likely to mask an issue with the user's setup. Presumably editors are either going to hide such files or change the extension.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions