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

Support for tasty test dependencies (Non-exhaustive pattern match warnings with tasty-1.4.1) #28

Open
sjakobi opened this issue Jul 6, 2021 · 1 comment

Comments

@sjakobi
Copy link

sjakobi commented Jul 6, 2021

I simply noticed these in the build log and wondered whether they would pose a problem:

Test/Tasty/Silver/Filter.hs:114:9: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In an equation for ‘filter'’:
        Patterns not matched:
            [] (After _ _ _)
            (_:_) (After _ _ _)
    |
114 |         filter' pth (SingleTest n t) = if prd (pth <//> n) then Just $ SingleTest n t else Nothing
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Test/Tasty/Silver/Interactive/Run.hs:36:1: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In an equation for ‘wrapRunTest'’:
        Patterns not matched:
            [] _ (After _ _ _)
            (_:_) _ (After _ _ _)
   |
36 | wrapRunTest' tp f (SingleTest n t) = SingleTest n (CustomTestExec t (f (tp <//> n) n))
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
@phile314
Copy link
Owner

phile314 commented Jul 7, 2021

Hm, looks like tasty-silver does not support test dependencies as introduced in UnkindPartition/tasty@6506bef / UnkindPartition/tasty#48 . As long as you are not using this tasty feature you should be perfectly fine.

I guess fixing the test filtering might not be so simple, as I guess if a test ends up in the final set of tests to run it should also include all transitive dependencies. I don't think I will get around to fix this in the near future, but if anybody wants to give it a go feel free to open a PR.

@phile314 phile314 changed the title Non-exhaustive pattern match warnings with tasty-1.4.1 Support for tasty test dependencies (Non-exhaustive pattern match warnings with tasty-1.4.1) Jul 7, 2021
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

2 participants