ocaml / dune

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

dune init project crashes with an absolute directory #7806

Open emillon opened 1 year ago

emillon commented 1 year ago
$ dune init project name /tmp/x
Entering directory '/tmp/x/name'
Internal error, please report upstream including the contents of _build/log.
Description:
  ("[as_in_source_tree_exn] called on something not in source tree",
  { t = External "/tmp/x" })
Raised at Stdune__code_error.raise in file
  "otherlibs/stdune/src/code_error.ml", line 11, characters 30-62
Called from Main__dune_init.Component.Make.dune_project_file in file
  "bin/dune_init.ml", line 408, characters 16-49
Called from Main__dune_init.Component.Make.proj in file "bin/dune_init.ml",
  line 482, characters 23-49
Called from Main__dune_init.Component.init in file "bin/dune_init.ml", line
  513, characters 26-42
Called from Main__init.project in file "bin/init.ml", line 205, characters
  5-99
Called from Cmdliner_term.app.(fun) in file
  "vendor/cmdliner/src/cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_eval.run_parser in file
  "vendor/cmdliner/src/cmdliner_eval.ml", line 34, characters 37-44
Called from Cmdliner_eval.eval_value in file
  "vendor/cmdliner/src/cmdliner_eval.ml", line 202, characters 14-39
Called from Main in file "bin/main.ml", line 97, characters 10-41
shonfeder commented 11 months ago

I will look at this over the weekend.