Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007821OCamltypingpublic2018-07-12 13:012018-07-16 15:36
Reporterdim 
Assigned Todim 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.07.0 
Target VersionFixed in Version 
Summary0007821: Incremental builds broken in 4.07
DescriptionThe "steps to reproduce" shows a case that fails with 4.07 but used to work with previous versions of the Compiler. The first build succeeds but the second fails.

What I don't understand is that the error mentions base.cmi when compiling info.ml. However Base depends on every other modules and no module depends on it, so the compiler shouldn't even try to read base.cmi when compiling info.ml.

I was thinking this could be due to the heuristic I added to print X__Y as X.Y, however there is no error message in the build so there is no type to print.
Steps To Reproduce$ git clone https://github.com/janestreet/base.git [^]
$ cd base
$ git checkout v0.11
$ make
$ sed -i '1i(* *)' src/string0.ml
$ make
jbuilder build @install
      ocamlc src/.base.objs/base__Info.{cmo,cmt} (exit 2)
(cd _build/default && /usr/local/home/jdimino/opam-root/4.07.0/bin/ocamlc.opt -w -40 -safe-string -g -bin-annot -I src/.base.objs -I /usr/local/home/jdimino/opam-root/4.07.0/lib/sexplib0 -I compiler-stdlib/src/.caml.objs -I shadow-stdlib/src/.shadow_stdlib.objs -no-alias-deps -open Base__ -o src/.base.objs/base__Info.cmo -c -impl src/info.ml)
File "src/info.ml", line 1:
Error: The files src/.base.objs/base__Info_intf.cmi
       and src/.base.objs/base.cmi make inconsistent assumptions
       over interface Base__String0
    ocamlopt src/.base.objs/base__Info.{cmx,o} (exit 2)
(cd _build/default && /usr/local/home/jdimino/opam-root/4.07.0/bin/ocamlopt.opt -w -40 -safe-string -g -I src/.base.objs -I /usr/local/home/jdimino/opam-root/4.07.0/lib/sexplib0 -I compiler-stdlib/src/.caml.objs -I shadow-stdlib/src/.shadow_stdlib.objs -no-alias-deps -open Base__ -o src/.base.objs/base__Info.cmx -c -impl src/info.ml)
File "src/info.ml", line 1:
Error: The files src/.base.objs/base__Info_intf.cmi
       and src/.base.objs/base.cmi make inconsistent assumptions
       over interface Base__String0
make: *** [default] Error 1
TagsNo tags attached.
Attached Files? file icon log-first-build [^] (174,844 bytes) 2018-07-16 12:33 [Show Content]
? file icon log-second-build [^] (37,041 bytes) 2018-07-16 12:33 [Show Content]

- Relationships

-  Notes
(0019242)
frisch (developer)
2018-07-12 15:55

Can this be reproduced with a sequential build? If so, could you produce a log of build commands?
(0019244)
dim (developer)
2018-07-16 12:35

Yes, I attached the log for the first and second builds. The second one is the one that's failing.

I'll try to get a smaller reproduction case. One other thought: IIRC, the naming heuristic is also applied for extensible constructors, and maybe the call for this is not protected against extra cmi loading.
(0019245)
dim (developer)
2018-07-16 12:37

That seems to be the case indeed: in translcore.ml, line 51
(0019246)
dim (developer)
2018-07-16 12:38

I'm preparing a PR
(0019247)
dim (developer)
2018-07-16 12:49

And I confirm that it fixes the issue
(0019248)
dim (developer)
2018-07-16 13:19

https://github.com/ocaml/ocaml/pull/1908 [^]

- Issue History
Date Modified Username Field Change
2018-07-12 13:01 dim New Issue
2018-07-12 15:55 frisch Note Added: 0019242
2018-07-16 12:33 dim File Added: log-first-build
2018-07-16 12:33 dim File Added: log-second-build
2018-07-16 12:35 dim Note Added: 0019244
2018-07-16 12:37 dim Note Added: 0019245
2018-07-16 12:38 dim Note Added: 0019246
2018-07-16 12:49 dim Note Added: 0019247
2018-07-16 13:19 dim Note Added: 0019248
2018-07-16 15:36 dim Status new => resolved
2018-07-16 15:36 dim Resolution open => fixed
2018-07-16 15:36 dim Assigned To => dim


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker