Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005550OCaml-for ocamlbuild use 11:312017-03-03 14:55
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005550: Cache results from `ocamlfind query` in _build/
DescriptionAnil Madhavapeddy reported that he uses ocamlbuild on large build trees for Mirage, and found the -use-ocamlfind integration unusable in his case because of the ocamlbuild's repeated invocation of `ocamlfind query`. His workaround is to devise his own ocamlfind logic in, that reuse library-location information gathered at ./configure time.

It would be nice if ocamlbuild cached `ocamlfind query` results in the _build/ subdirectory, so that they don't have to be recomputed across ocamlbuild calls.
Additional InformationAfter a quick look at ocamlbuild/, it appears that ocamlbuild already caches `ocamlfind query` results across a single ocamlbuild run, by using a hashtable at runtime. So this amount to making this hash-table pervasive by somehow storing it in a file in _build.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
gasche (administrator)
2012-03-20 11:32

Marking this acknowledged after discussion with xclerc.
As always, patches are welcome.
gasche (administrator)
2012-03-20 11:34

Remark: if documented, that feature should be documented because the user could observe caching by compiling a project, installing/removing/updating ocamlfind stuff, then recompiling from (now outdated) cached information.

I don't think there is any magic technique to detect such getting-out-of-date case: does ocamlfind store a time-of-last-update somewhere that is less costly to access that `ocamlfind query`? But this is probably a rare case and we could just document it and recommend to -clean on such occasions, or provide a -clean-ocamlfind option, or advise to `rm _build/ocamlfind.cache` or something.
doligez (administrator)
2017-03-03 14:55

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to [^]

- Issue History
Date Modified Username Field Change
2012-03-20 11:31 gasche New Issue
2012-03-20 11:32 gasche Note Added: 0007114
2012-03-20 11:32 gasche Status new => acknowledged
2012-03-20 11:34 gasche Note Added: 0007115
2017-02-23 16:34 doligez Category OCamlbuild (the tool) => for ocamlbuild use [^]
2017-02-23 16:44 doligez Category for ocamlbuild use [^] => -for ocamlbuild use [^]
2017-03-03 14:55 doligez Note Added: 0017542
2017-03-03 14:55 doligez Status acknowledged => resolved
2017-03-03 14:55 doligez Resolution open => suspended

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker