sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
357 stars 72 forks source link

When building with GHCJS, test cases fail but results look ok #242

Open ddssff opened 2 years ago

ddssff commented 2 years ago

Because GHCJS has different word sizes, the equality tests that work in GHC fail. For example,

     13) Clay.Color.darken does not darken an HSL color past black
       expected: Hsla 154 0.787 9.2e-2 255.0
        but got: Hsla 154 0.787 9.2e-2 255.0

The tests must be using equality when "close enough" is what we need.

turion commented 2 years ago

That's a puzzling error message :sweat_smile: . So we'd first need a working CI check that runs clay on GHCJS, and then fix the tests. PRs welcome.

ddssff commented 2 years ago

What is the situtation with CI these days? I lost track when travis disappeared.

turion commented 2 years ago

We have Github Actions with Ubuntu & cabal: https://github.com/sebastiaanvisser/clay/blob/master/.github/workflows/ci.yml But I have no idea whether one can GHCJS there. Maybe we should also reinstate the nix CI job.