Commit 7f0e066
committed
Make Setup.hs configure more CWD-independent.
Previously, we were checking the package with a hard-coded root
directory of ".". This was not a problem before, but with #5372 we
have started to expand globs while checking packages, which breaks if
the CWD is not the directory containing the `.cabal` file and causes
snowleopard/hadrian#634.
Luckily, this is an easy fix: the correct directory is easy to
determine. Writing a test and making sure it's tickling the failing
case took longer than writing the fix!
"." is hard-coded as the root directory passed to `checkPackageFiles`
in a few other places, but those are (a) non-trivial to test, and (b)
already in places that have other assumptions about their CWD, so I
have simply documented the CWD requirement for those.1 parent 2ce4858 commit 7f0e066
File tree
11 files changed
+53
-16
lines changed- Cabal
- Distribution
- PackageDescription
- Simple
- cabal-install/Distribution/Client
- cabal-testsuite
- PackageTests/Regression/HadrianT634
- pkg
- doc
- Test/Cabal
11 files changed
+53
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1840 | 1840 | | |
1841 | 1841 | | |
1842 | 1842 | | |
1843 | | - | |
1844 | | - | |
| 1843 | + | |
| 1844 | + | |
1845 | 1845 | | |
1846 | | - | |
| 1846 | + | |
1847 | 1847 | | |
1848 | 1848 | | |
1849 | 1849 | | |
| |||
2155 | 2155 | | |
2156 | 2156 | | |
2157 | 2157 | | |
2158 | | - | |
| 2158 | + | |
2159 | 2159 | | |
2160 | 2160 | | |
2161 | 2161 | | |
2162 | 2162 | | |
2163 | 2163 | | |
2164 | 2164 | | |
2165 | | - | |
| 2165 | + | |
| 2166 | + | |
2166 | 2167 | | |
2167 | 2168 | | |
2168 | | - | |
| 2169 | + | |
2169 | 2170 | | |
2170 | | - | |
2171 | | - | |
| 2171 | + | |
2172 | 2172 | | |
2173 | 2173 | | |
2174 | 2174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
476 | 478 | | |
477 | | - | |
| 479 | + | |
478 | 480 | | |
479 | 481 | | |
480 | 482 | | |
| |||
1841 | 1843 | | |
1842 | 1844 | | |
1843 | 1845 | | |
| 1846 | + | |
| 1847 | + | |
1844 | 1848 | | |
1845 | 1849 | | |
1846 | 1850 | | |
1847 | | - | |
1848 | | - | |
| 1851 | + | |
| 1852 | + | |
1849 | 1853 | | |
1850 | 1854 | | |
1851 | 1855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
471 | 473 | | |
472 | 474 | | |
473 | | - | |
| 475 | + | |
474 | 476 | | |
475 | 477 | | |
476 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments