Holmusk / elm-street

:deciduous_tree: Crossing the road between Haskell and Elm
Mozilla Public License 2.0
88 stars 6 forks source link

Missing test/golden/oneType.json on hackage #135

Closed alaendle closed 1 year ago

alaendle commented 1 year ago

Hackage distribution misses file - see https://hackage.haskell.org/package/elm-street-0.2.1.0/src/.

Registering library 'types' for elm-street-0.2.1.0..
elm-street                 > test (suite: elm-street-test)

Progress 64/65: elm-street
golden tests
  Default CodeGenOptions
    Golden JSON -> Haskell == default [✘]
    default -> JSON -> Haskell == default [✔]
  Custom CodeGenOptions
    should decode type with custom CodeGenOptions [✔]
    should encode type with custom CodeGen [✔]

Failures:

  test/Test/Golden.hs:13:9: 
  1) golden tests, Default CodeGenOptions, Golden JSON -> Haskell == default
       uncaught exception: IOException of type NoSuchThing
       test/golden/oneType.json: openBinaryFile: does not exist (No such file or directory)
jhrcek commented 1 year ago

Thanks for reporting this @alaendle I wonder how you noticed this and reported it so quickly. Are you some kind of hackage trustee or where did you notice this error? Just curious :smile:

alaendle commented 1 year ago

Very close, stackage curator - so trying to build and re-enable all kind of packages in my spare time 🤯

jhrcek commented 1 year ago

I'm curious about the process. Where did you see the failure? What made you look at exactly this package? Just looking for pointers about what I could potentially do to prevent these kinds of "problematic" releases :smile: I'm gonna push a fixed version to hackage later today.

turboMaCk commented 1 year ago

I would recommend we run tests from installation rather than source code directory (which is what hides this issue) in CI. This would help to uncover all the files that tests depend on but are missing in the distribution. I don't know exactly how to do this with stack though since I usually test things like this using nix in my projects. But I think it should not be that complicated. You can test it even yourself on your machine by running tests for the library using cabal with cabal install --run-tests elm-street or something like that.

jhrcek commented 1 year ago

I'll look into that later. In the meantime I uploaded https://hackage.haskell.org/package/elm-street-0.2.1.1 which should have the missing file

jhrcek commented 1 year ago

Resolved in https://github.com/Holmusk/elm-street/pull/136

alaendle commented 1 year ago

I'm curious about the process. Where did you see the failure? What made you look at exactly this package? Just looking for pointers about what I could potentially do to prevent these kinds of "problematic" releases 😄 I'm gonna push a fixed version to hackage later today.

Well I just took a look at this package because it was disabled in stackage nightly and a new release appeared on hackage - so I just used https://github.com/commercialhaskell/stackage/blob/master/verify-package to verify if there is still a problem with this package, or if I could re-include it to stackage nightly.

Long story short, elm-street should reappear in one of the next nightly stackage builds.