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

Call [Dune_util.Log.init] as soon as possible #6542

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

snowleopard
Copy link
Collaborator

@snowleopard snowleopard commented Nov 22, 2022

I somehow corrupted the digest database and hit the following exception on Dune startup:

Description:
  ("Fdecl.get: not set", {})
Raised at Stdune__Code_error.raise in file "code_error.ml", line 10,
  characters 30-62
Called from Stdune__Fdecl.get in file "fdecl.ml" (inlined), line 23,
  characters 13-53
Called from Dune_util__Log.t in file "log.ml" (inlined), line 41, characters
  11-22
Called from Dune_util__Log.info_user_message in file "log.ml", line 44,
  characters 8-12
Called from Dune_util__Persistent.Make.load.(fun) in file "persistent.ml",
  line 72, characters 14-345
Called from Stdune__Exn.protectx in file "exn.ml" (inlined), line 10,
  characters 8-11
Called from Stdune__Io.Make.with_file_in in file "io.ml" (inlined), line 102,
  characters 35-89
Called from Dune_util__Persistent.Make.load in file "persistent.ml", line 64,
[...]

This PR moves the call to Dune_util.Log.init as early as possible.

This fixed the build for me and I saw the following in the log:

# Failed to load corrupted file _build/.digest-db: input_value: truncated
# object

Signed-off-by: Andrey Mokhov <amokhov@janestreet.com>
@snowleopard snowleopard merged commit 1bac0f2 into main Nov 22, 2022
@snowleopard snowleopard deleted the snowleopard-patch-1 branch November 22, 2022 15:50
jchavarri added a commit to jchavarri/dune that referenced this pull request Nov 24, 2022
* main: (58 commits)
  test: formatting of alternative dune files (ocaml#6567)
  refactor: remove Modules.is_empty (ocaml#6564)
  refactor: module kinds (ocaml#6562)
  refactor(coq): resolve lack of coqc properly
  Cache file contents in action builder by name. (ocaml#6555)
  fix: re-enable dune on older macos sdk's (ocaml#6515)
  fix: do not hide lib interface module (ocaml#6549)
  test: remove pkg-config output for reproducibility (ocaml#6543)
  melange: add test for ocaml flags (ocaml#6548)
  fix: improve virtual library error messages
  test: virtual library and impl locations
  test: alias module regression (ocaml#6544)
  refactor(merlin): dump config sub command (ocaml#6547)
  refactor: simplify merlin (ocaml#6508)
  chore(nix): use nix-overlays for the slim devShell (ocaml#6546)
  fix: module compilation rule env (ocaml#6527)
  chore: update nix (ocaml#6536)
  fix: merlin rules with pp's (ocaml#6474)
  Call [Dune_util.Log.init] as soon as possible (ocaml#6542)
  refactor: speed up stdlib build (ocaml#6524)
  ...
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.

None yet

2 participants