ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.64k stars 409 forks source link

`describe pp` crashes with "Lib.DB.get_compile_info got library that doesn't exist" #10999

Open sim642 opened 1 month ago

sim642 commented 1 month ago

Expected Behavior

dune describe pp src/cdomain/value/cdomains/intDomain.ml does not crash.

Actual Behavior

It crashes with

Internal error, please report upstream including the contents of _build/log.
Description:
  ("Lib.DB.get_compile_info got library that doesn't exist",
  { lib_id =
      Local
        { name = "goblint_cdomain_value"
        ; loc = "src/cdomain/value/dune:4"
        ; src_dir = In_source_tree "src/cdomain/value/cdomains"
        }
  })
Raised at Stdune__Code_error.raise in file
  "otherlibs/stdune/src/code_error.ml", line 10, characters 30-62
Called from Fiber__Core.O.(>>|).(fun) in file "vendor/fiber/src/core.ml",
  line 253, characters 36-41
Called from Fiber__Scheduler.exec in file "vendor/fiber/src/scheduler.ml",
  line 76, characters 8-11

I must not crash.  Uncertainty is the mind-killer. Exceptions are the
little-death that brings total obliteration.  I will fully express my cases. 
Execution will pass over me and through me.  And when it has gone past, I
will unwind the stack along its path.  Where the cases are handled there will
be nothing.  Only I will remain.

_build/log just contains

# dune describe pp --verbose src/cdomain/value/cdomains/intDomain.ml
# OCAMLPARAM: unset
# Shared cache: enabled
# Shared cache location: /home/simmo/.cache/dune/db
# Workspace root: /home/simmo/dev/goblint/sv-comp/goblint
# Auto-detected concurrency: 16
# Dune context:
#  { name = "default"
#  ; kind = "default"
#  ; profile = Dev
#  ; merlin = true
#  ; fdo_target_exe = None
#  ; build_dir = In_build_dir "default"
#  ; instrument_with = []
#  }
$ /home/simmo/dev/goblint/sv-comp/goblint/_opam/bin/ocamlc.opt -config > /tmp/dune_1b7f4d_output

Reproduction

This happens on https://github.com/goblint/analyzer, e.g. at commit 0deedb9ca2aeb11d9e6562161f57eee1908af498.

Specifications

rgrinberg commented 1 month ago

Are you able to reproduce this in the main branch? I think we fixed something like this recently