A bindings gap stops a build, and says which file to edit
This commit is contained in:
parent
2957804ebc
commit
68625a535e
38
lib/load.ml
38
lib/load.ml
@ -877,17 +877,33 @@ let rec import ~seen ~open_ ~loc alias dir =
|
|||||||
in
|
in
|
||||||
List.iter
|
List.iter
|
||||||
(fun (x : Cimport.const_diff) ->
|
(fun (x : Cimport.const_diff) ->
|
||||||
(* Only the findings that are the *library* contradicting the
|
(* Both kinds stop a build, and they are worded differently
|
||||||
package stop a build. A [defenum] nobody mapped and a rule
|
because they are different accusations.
|
||||||
that reaches nothing are about the package's own
|
|
||||||
`bindings` file, and they gate `flan generate-c`, which is
|
[cmapping = false] is the library contradicting the
|
||||||
where that file is edited — telling a lane that added an
|
package: a value that is one number here and another
|
||||||
enum to go and fix a config, in a message shaped like "the
|
there. [cmapping = true] is the package's own `bindings`
|
||||||
layout is wrong", is the wrong thing to stop a build
|
file not covering something — a [defenum] nobody mapped,
|
||||||
with. *)
|
a rule that reaches nothing.
|
||||||
if not x.Cimport.cmapping then
|
|
||||||
fail (Option.value ~default:loc (cloc x.Cimport.cname))
|
The second was gated to `flan generate-c` at first, on the
|
||||||
"the package disagrees with %s: %s" h x.Cimport.cwhy)
|
argument that stopping a build over a config file is the
|
||||||
|
wrong stop. The objection was really to the *wording*: it
|
||||||
|
arrived wrapped in "the package disagrees with the
|
||||||
|
header", which describes a layout bug and sends the reader
|
||||||
|
to the wrong file. Gating it instead meant an unchecked
|
||||||
|
enum member — exactly the silent wrongness the header read
|
||||||
|
exists to catch — went unreported on every ordinary build,
|
||||||
|
and "remember to run generate-c" is the same shape as
|
||||||
|
"remember to check the header by eye", which is what this
|
||||||
|
replaced. So: still fatal, and the wording names the file
|
||||||
|
and both ways out. *)
|
||||||
|
let at = Option.value ~default:loc (cloc x.Cimport.cname) in
|
||||||
|
if x.Cimport.cmapping then
|
||||||
|
fail at "%s" x.Cimport.cwhy
|
||||||
|
else
|
||||||
|
fail at "the package disagrees with %s: %s" h
|
||||||
|
x.Cimport.cwhy)
|
||||||
(Cimport.check_constants ~config ~enums ~consts:pconsts dump);
|
(Cimport.check_constants ~config ~enums ~consts:pconsts dump);
|
||||||
r)
|
r)
|
||||||
(header_specs ~loc dir)
|
(header_specs ~loc dir)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user