purescript-contrib / purescript-these

Data type isomorphic to α ∨ β ∨ (α ∧ β)
MIT License
14 stars 11 forks source link

Separate out test dependencies #39

Open adrianroe opened 3 years ago

adrianroe commented 3 years ago

Description of the change Changes to the spago.dhall file and move all test code to live under the test subdirectory so that projects using the library don't need the transitive test dependencies

Tests now run with spago -x test.dhall test

thomashoneyman commented 3 years ago

I'll let others weigh in as to whether we want to do this, given that Spago is getting targets (see https://github.com/purescript/spago/issues/681 and https://github.com/purescript/spago/pull/811/), but users downloading this library via the package sets won't be using the spago.dhall file in this repository -- they use the one defined in the package sets:

https://github.com/purescript/package-sets/blob/b463e4bb76688e2b390f49b5017f01894ecb41e0/src/groups/purescript-contrib.dhall#L451-L456

The one here is just for local development. That will change when the PureScript registry comes out, though.

adrianroe commented 3 years ago

It's not so much the spago dhall changes that motivated the PR - it was more moving the test code from the src directory to test as otherwise anything using the packages needs quickcheck available to compile, even though it's for test code.

Not all the backends to PS have access to a native Quickcheck...

adrianroe commented 3 years ago

...and I have clearly broken your CI testing in the process (as it presumably isn't looking for a test.dhall). My apologies for that!

thomashoneyman commented 3 years ago

Ah! In that case, this has been discussed before — see #32 and #33.

adrianroe commented 3 years ago

Makes sense! Maybe one way forward would be to have purescript-these and purescript-these-verify (or -laws, -quickcheck or somesuch). I absolutely get the importance of that code for others wanting to verify their specific instances, but it's quite a heavy dependency for what I suspect is a minority use case.

No worries either way round - I concede I'm an edge case and can live with running from a fork!

Thanks for a high quality library!