Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parallel build: Delay toplevel database reads #75

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

kit-ty-kate
Copy link
Contributor

When compiling camomile using several cores it might fail with the following errors (with backtraces):

parse_allkeys Camomile/database/acset.mar,Camomile/database/allkeys.mar (exit 2)
(cd _build/default/Camomile && tools/parse_allkeys.exe database unidata/tr10/allkeys.txt)
Fatal error: exception Not_found
Raised at file "Camomile/internal/database.ml", line 50, characters 52-67
Called from file "Camomile/internal/unidata.ml" (inlined), line 187, characters 4-48
Called from file "Camomile/public/uCharInfo.ml", line 443, characters 34-50
Called from file "Camomile/toolslib/absCe.ml", line 40, characters 14-44
parse_specialcasing Camomile/database/special_casing.mar (exit 2)
(cd _build/default/Camomile && tools/parse_specialcasing.exe database unidata/SpecialCasing.txt)
Fatal error: exception Not_found
Raised at file "Camomile/internal/database.ml", line 50, characters 52-67
Called from file "Camomile/internal/unidata.ml" (inlined), line 187, characters 4-48
Called from file "Camomile/public/uCharInfo.ml", line 443, characters 34-50
Called from file "Camomile/tools/parse_specialcasing.ml", line 40, characters 19-49

This PR fixes the issue. One thing I don't understand is how the call to read_data "acset" in ColParser didn't make everything fail every time since it is included in the toolslib library and this library is used to create acset.mar itself..

Anyway, I think avoiding side-effects on toplevel (even inside functors) is a good practice in any case.

Related to ocaml/opam-repository#13980

@rgrinberg rgrinberg merged commit b79062a into yoriyuki:master Aug 1, 2019
rgrinberg added a commit to rgrinberg/opam-repository that referenced this pull request Aug 8, 2019
CHANGES:

- Use dune's include_subdirs (yoriyuki/Camomile#72)

- Fix parallel build (yoriyuki/Camomile#75)

- Add `(mode fallback)` to installConfig.ml (yoriyuki/Camomile#76)

- Fix iana executable (yoriyuki/Camomile#77)

- Generate opam files from dune. (yoriyuki/Camomile#78)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants