Commit f986076
authored
Fix string contexts in cabal project parser (#2179)
* Fix cabal pkg-config performance issue
The dummy version of `pkg-config` we provide to cabal-install-solver so that it can make an appropriate plan includes an extra blank line at the end of it's output.
In more recent versions of cabal-install-solver the following change has been made:
haskell/cabal@0b34b4e
This change now filters the `null` value from the list of package names. Then when the versions are looked up the output is not the expected length (because there is also a blank line at the end of the version list).
This change updates the dummy pkg-config script so that it does not include the extra blank lines at the end of the output.
* Fix string contexts in cabal project parser
When both `repository` and `source-repository-packages` are included in a `cabal.project` (including `cabalProjectLocal`), the context needed for the `repository` is lost in the cabal project parser.
This means nix store path is not included in the dependencies of the plan-nix derivation and it fails with an error like this:
```
/nix/store/x-source/root.json:openBinaryFile: does not exist (No such file or directory)
```
This fix makes sure the context is correct by looking for /nix/store strings in the repository url and appending them to the context.1 parent 433a6c9 commit f986076
1 file changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | | - | |
| 149 | + | |
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
| |||
174 | 180 | | |
175 | 181 | | |
176 | 182 | | |
177 | | - | |
| 183 | + | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
| |||
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 204 | + | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| |||
0 commit comments