File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
1
using Aqua
2
2
3
+ const MAX_AMBIGUITIES = 15
4
+
3
5
# FIXME : we have plenty of ambiguities, let's at least ensure that we don't create more
4
6
let ambs = Aqua. detect_ambiguities (CUDA; recursive= true )
5
7
pkg_match (pkgname, pkgdir:: Nothing ) = false
@@ -8,8 +10,25 @@ let ambs = Aqua.detect_ambiguities(CUDA; recursive=true)
8
10
# StaticArrays pirates a bunch of Random stuff...
9
11
filter! (x -> ! pkg_match (" StaticArrays" , pkgdir (first (x). module)), ambs)
10
12
11
- @warn " Remaining ambiguities: $(length (ambs)) "
12
- @test length (ambs) ≤ 15
13
+ # if we'll fail this test, at least show which ambiguities were detected
14
+ if length (ambs) > MAX_AMBIGUITIES
15
+ for (ma, mb) in ambs
16
+ println ()
17
+ println (" Ambiguity detected:" )
18
+ if VERSION >= v " 1.9"
19
+ print (" " )
20
+ Base. show_method (stdout , ma)
21
+ println ()
22
+ print (" " )
23
+ Base. show_method (stdout , mb)
24
+ println ()
25
+ else
26
+ println (" " , ma)
27
+ println (" " , mb)
28
+ end
29
+ end
30
+ end
31
+ @test length (ambs) ≤ MAX_AMBIGUITIES
13
32
end
14
33
15
34
Aqua. test_all (CUDA;
You can’t perform that action at this time.
0 commit comments