Skip to content

cabal.project.local: Warn if referencing *different* branches of different subdirectories of same repository #11192

@benjaminweb

Description

@benjaminweb

Describe the feature request

It's quite common to have multiple packages in the same repo:
cabal.project.local:

source-repository-package
  type: git
  location: https://github.com/benjaminweb/selda
  subdir: selda
  tag: streaming

source-repository-package
  type: git
  location: https://github.com/benjaminweb/selda
  subdir: selda-sqlite
  tag: main

should raise a warning like:

Warning: You are referencing different branches of the same repo with different subdirectories. If you are encountering weird compiler errors, change them to the same branch.

Additional context
What made you ask for this functionality?
Spent quite some time to realise that I've sourced two subdirectories of the same repo with different branches.

How would the feature benefit you and other users?
A warning makes me instantly aware of the cause of the code not compiling instead of spending quite some time searching for the culprit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions