Skip to content

Concurrent cabal new-build runs cause non-deterministic failures #4811

@TomMD

Description

@TomMD

When running concurrent new-builds such as:

cabal new-build -ghc-options=-fmax-errors=1 &
 cabal new-build -ghc-options=-fmax-errors=2

I get non-deterministic errors. Consider the below which appears to reference different versions of the same package:

[project]/Git.hs:29:71: error:
    • Couldn't match type ‘text-1.2.2.2:Data.Text.Internal.Text’
                     with ‘Text’
      NB: ‘Text’
            is defined in ‘Data.Text.Internal’ in package ‘text-1.2.2.2’
          ‘text-1.2.2.2:Data.Text.Internal.Text’
            is defined in ‘Data.Text.Internal’ in package ‘text-1.2.2.2’
      Expected type: Text
        Actual type: CommitID
    • In the first argument of ‘T.unpack’, namely ‘cid’
      In the expression: T.unpack cid
      In the second argument of ‘readProcess’, namely
        ‘["log", "--pretty=%P", "-n1", T.unpack cid]’

N.B. type CommitID = Text

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