Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move the Prim helper module into into primitive test suite #100

Open
cartazio opened this issue May 1, 2019 · 10 comments
Open

move the Prim helper module into into primitive test suite #100

cartazio opened this issue May 1, 2019 · 10 comments

Comments

@cartazio
Copy link

cartazio commented May 1, 2019

then test suite can be part of the normal cabal file and all the test suite deps dont have to be rebuilt every time via the cabal project file...

(which i personally find maddening for local hackery)

@cartazio
Copy link
Author

cartazio commented May 1, 2019

i'll see about doing some PRs for this, though i may just vendor the whole package just to keep things sane on my side ..

@cartazio
Copy link
Author

cartazio commented May 1, 2019

i guess another option would be to make the primitive deps conditional so primitive can have a copy of that module to avoid build cycles, but where other packages dont set the -f-primitive flag or whatever so they get it? (maybe that would be a nicer change for you / would you be open to that?)

@andrewthad
Copy link
Owner

I'd be fine with having a -f-primitive flag to disable the primitive dependency. We would need to copy primLaws into the test suite for primitive. In this setup, the test suite still couldn't be part of the normal the normal primitive.cabal file since it would require building quickcheck-classes with a bunch of flags set. But I think that's a small price to pay for the benefit of getting more tests for things like Eq, Show, Read, Foldable, Traversable, etc. as they are contributed to quickcheck-classes.

@cartazio
Copy link
Author

cartazio commented May 1, 2019

gotcha, ideally I'd really like to shift things around so that we can use normal testing stanzas at least, but just killing the rebuild pain would be nice. (it drives me crazy, plus the cabal project vendored deps actually leak into my local project file search results :) )

@cartazio
Copy link
Author

@andrewthad i have a strawman of this jankily done with primitive 0.7 / master, let me know how we can progress on this side :)

@andrewthad
Copy link
Owner

At some point in the next month, I'm going to split a quickcheck-classes-base out of quickcheck-classes. There shouldn't be any problem with primitive's test suite depending on quickcheck-classes-base. We'll still need to copy primLaws into primitive's test suite. This will eliminate something like 90% of the code duplication.

@cartazio
Copy link
Author

cartazio commented May 24, 2019 via email

@chessai
Copy link
Collaborator

chessai commented Aug 8, 2019

@cartazio this is pretty much done, and our crappy CI passes for all GHCs >= 7.4, so we just need to make a release of both packages.

@andrewthad
Copy link
Owner

quickcheck-classes-base is now on hackage. This doesn't transitively depend on primitive, so it should be able to be used in primitive's test suite.

@cartazio
Copy link
Author

cartazio commented Aug 8, 2019

YAY, thank you very very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants