-
Notifications
You must be signed in to change notification settings - Fork 144
Add a few basic tests for unboxing and RULES working #714
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
base: master
Are you sure you want to change the base?
Conversation
This uses tasty-inspection-testing, which is a plugin and so introduces a circular dependency: bytestring -> plugin -> ghc -> bytestring This is worked around with an ugly but simple hack: Guard the part of the testsuite that uses the plugin behind a flag, and change the name of the (local) package before trying to build the testsuite with that flag enabled.
bytestring.cabal
Outdated
default: False | ||
manual: True | ||
|
||
Flag plugin-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat suboptimal, because Hackage won't have any idea that this is an internal flag for tests only and will proudly advertise the flag to everyone. Given that we hack the Cabal file anyway, could we insert build-depends
and other-modules
as a part of shell script too?
@@ -0,0 +1,45 @@ | |||
{-# LANGUAGE TemplateHaskellQuotes #-} | |||
|
|||
module PluginTests.Splices where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add an explicit export list?
, (`doesNotUseAnyOf` unpackCString_functions_all) | ||
] | ||
|
||
hasNoStringyStuffExceptFolds :: Name -> Q Exp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one seems unused anywhere?
@@ -0,0 +1,14 @@ | |||
# small script to hackily work around the dependency cycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you feel about chmod +x
on this file?
This uses
tasty-inspection-testing
, whichisneeds a plugin and so introduces a circular dependency:This is worked around with an ugly but simple hack: Guard the part of the testsuite that uses the plugin behind a flag, and change the name of the (local) package before trying to build the testsuite with that flag enabled.
(Obviously there are more similar tests that could be added if this works and isn't too repulsive.)