Commit a43da16
committed
fix(opam-create): only upgrade existing
Fixes #14428.
The 3.23 menhir auto-injection (#14168) was triggered by the
project-wide `(using menhir ...)` extension and added `menhir` as a
new dependency to every package's generated opam file, regardless of
whether the package's own `(depends ...)` field declared it. In
multi-package projects where only some packages used menhir, every
package gained a spurious build-time dependency.
The original ask in #10707 was narrower: when a generated opam file
*already* lists `menhir`, fill in the lower bound `{>= "20180523"}`
that dune's menhir rules require. Restrict the behaviour to that.
- A package that does not declare `(depends menhir)` no longer has
`menhir` added by dune.
- A package that declares bare `(depends menhir)` has the lower
bound filled in, as before.
- A package whose `(depends ...)` already specifies a constraint
(version bound, `{with-test}`, etc.) is preserved verbatim.
The convenience of auto-adding `menhir` for users who use a
`(menhir ...)` stanza but forget to declare `(depends menhir)` is
deliberately removed: the dependency-inference logic that supported
it was the source of #14428 and out of scope for #10707.
Signed-off-by: Robin Bate Boerop <me@robinbb.com>menhir deps; do not add new1 parent 5fa4ca0 commit a43da16
3 files changed
Lines changed: 44 additions & 36 deletions
File tree
- doc/changes/fixed
- src/dune_rules
- test/blackbox-tests/test-cases/menhir
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
319 | 316 | | |
320 | 317 | | |
321 | 318 | | |
| |||
344 | 341 | | |
345 | 342 | | |
346 | 343 | | |
347 | | - | |
| 344 | + | |
348 | 345 | | |
349 | 346 | | |
350 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
6 | 7 | | |
7 | | - | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | | - | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
0 commit comments