You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get stan tests running in nixpkgs. As dependencies we use stackage-nightly + newest versions from hackage if not on stackage. This conforms to the cabal bounds given in stan.cabal (with exception of pretty-simple (see #408), if that's the culprit I am very sorry, but it seems unlikely.)
I get the following test error, which does not happen in your CI:
ObservationId is properly ignored
Failures:
test/Test/Stan/Analysis/Common.hs:62:5:
1) Static Analysis, Anti-patterns, STAN-0204: finds usage of 'Data.HashMap.size'
expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0204-wu5bTi-28:19"}, observationInspectionId = Id {unId = "STAN-0204"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 28 19 26, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
but got: Nothing
To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0204: finds usage of 'Data.HashMap.size'/"
test/Test/Stan/Analysis/Common.hs:62:5:
2) Static Analysis, Anti-patterns, STAN-0204: finds usage of 'length' for 'HashMap'
expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0204-wu5bTi-31:21"}, observationInspectionId = Id {unId = "STAN-0204"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 31 21 27, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
but got: Nothing
To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0204: finds usage of 'length' for 'HashMap'/"
test/Test/Stan/Analysis/Common.hs:62:5:
3) Static Analysis, Anti-patterns, STAN-0205: finds usage of 'Data.HashSet.size'
expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0205-wu5bTi-34:19"}, observationInspectionId = Id {unId = "STAN-0205"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 34 19 26, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
but got: Nothing
To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0205: finds usage of 'Data.HashSet.size'/"
test/Test/Stan/Analysis/Common.hs:62:5:
4) Static Analysis, Anti-patterns, STAN-0205: finds usage of 'length' for 'HashSet'
expected: Just (Observation {observationId = Id {unId = "OBS-STAN-0205-wu5bTi-37:21"}, observationInspectionId = Id {unId = "STAN-0205"}, observationSrcSpan = SrcSpanOneLine "target/Target/AntiPattern.hs" 37 21 27, observationFile = "target/Target/AntiPattern.hs", observationModuleName = ModuleName {unModuleName = "Target.AntiPattern"}, observationFileContent = ""})
but got: Nothing
To rerun use: --match "/Static Analysis/Anti-patterns/STAN-0205: finds usage of 'length' for 'HashSet'/"
Randomized with seed 1738248362
Any insight into what could be going wrong would be highly appreciated.
The text was updated successfully, but these errors were encountered:
Hi @maralorn! Most likely the reason for this error is the fact that the name of the unordered-containers package is not mentioned in the HIE files. Turns out, different build tools change package names on different systems using different tricks to satisfy the file path limit. Moreover, GHC itself allows registering packages under arbitrary names.
We've implemented several hacks to support as many standard use cases as possible:
But I'm personally not on NixOS and I don't use Nix to build Haskell packages, so I can't debug the issue by myself. My guess would be is that Nix doesn't mention the package name at all when registering dependencies. But to be sure, one must debug the content of HIE files.
Hey!
I am trying to get stan tests running in nixpkgs. As dependencies we use stackage-nightly + newest versions from hackage if not on stackage. This conforms to the cabal bounds given in
stan.cabal
(with exception ofpretty-simple
(see #408), if that's the culprit I am very sorry, but it seems unlikely.)I get the following test error, which does not happen in your CI:
Any insight into what could be going wrong would be highly appreciated.
The text was updated successfully, but these errors were encountered: