|
21 | 21 |
|
22 | 22 | # Known failures - these will be skipped unless -f is used |
23 | 23 | KNOWN_FAILURES=( |
24 | | - iterator # Makes use of Apple block extension which would require clang (see #913) |
25 | | - decls_in_signature # Unusable struct (see #1128) |
26 | | - redeclaration # Same as typenames |
27 | | - typenames # hs-bindgen namespace possible bug/feature |
| 24 | + edge-cases/iterator # Makes use of Apple block extension which would require clang (see #913) |
| 25 | + functions/decls_in_signature # Unusable struct (see #1128) |
| 26 | + declarations/redeclaration # Multiple declarations (intentional test case) |
| 27 | + types/typenames # Multiple declarations (hs-bindgen namespace possible bug/feature) |
28 | 28 | ) |
29 | 29 |
|
30 | 30 | # Default options |
@@ -101,11 +101,15 @@ compile_fixture() { |
101 | 101 | # |
102 | 102 | # NOTE: I (Joris) am not 100% sure, but it looks like the order in which the |
103 | 103 | # files are passed to the GHC invocation matters for module dependency |
104 | | - # resolution. Just a simple sort based on the name of the file is sufficient |
105 | | - # for now to prevent GHC errors. If a "module not found" error ever pop ups |
106 | | - # in the future, then this might be caused by an inadequate sort here. |
| 104 | + # resolution. We sort by directory depth first (shallower files first), then |
| 105 | + # alphabetically. This ensures Example.pp.hs is compiled before Example/*.pp.hs, |
| 106 | + # which is necessary since the submodules import the main Example module. |
107 | 107 | local files |
108 | | - files=$(find "$FIXTURES_DIR/$fixture_name/" -type f -name "*.pp.hs" -print0 | sort -z | xargs -0 echo) |
| 108 | + files=$(find "$FIXTURES_DIR/$fixture_name/" -type f -name "*.pp.hs" -print0 | \ |
| 109 | + xargs -0 -I {} sh -c 'echo $(echo "{}" | tr -cd "/" | wc -c) "{}"' | \ |
| 110 | + sort -n | \ |
| 111 | + cut -d' ' -f2- | \ |
| 112 | + tr '\n' ' ') |
109 | 113 |
|
110 | 114 | # Use a temporary output file to avoid polluting the fixtures directory |
111 | 115 | local output_dir |
|
0 commit comments