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

Ocamldebug support broken in 3.6 #6929

Closed
jserot opened this issue Jan 25, 2023 · 11 comments · Fixed by #6988 or ocaml/opam-repository#23349
Closed

Ocamldebug support broken in 3.6 #6929

jserot opened this issue Jan 25, 2023 · 11 comments · Fixed by #6988 or ocaml/opam-repository#23349

Comments

@jserot
Copy link

jserot commented Jan 25, 2023

When launching ocamldebug on a bytecode executable generated with dune(v 3.6), the directory variable, used to search for source files is no longer set correctly:

Example:

	OCaml Debugger version 5.0.0

(ocd) break @ Main 2
Loading program... done.
No source file for Main.
(ocd) directory
Reinitialize directory list ? (y or n) n
Directories:  . /Users/xxx/.opam/5.0.0/lib/ocaml
  /Users/xxx/.opam/5.0.0/.opam-switch/build/ocaml-base-compiler.5.0.0/stdlib
  /Users/xxx/.opam/5.0.0/lib/ocaml /workspace_root /workspace_root/example
  /workspace_root/example/.main.eobjs/byte /workspace_root/src/lib
  /workspace_root/src/lib/.foo.objs/byte

The dune variable workspace_root has not been resolved.

Things were ok when using dune 2.6.

OCaml 5.0, dune 3.6

@richardlford
Copy link
Contributor

richardlford commented Feb 2, 2023

The code that is causing this problem is in src/dune_engine/action_exec.ml. The mapping is taking place on lines 538-539 in the current sources which are:

              { source = Path.to_absolute_filename root
              ; target = "/workspace_root" }

I don't know what other purposes this code has, but a workaround that lets ocamldebug work again is to replace this with:

              { source = Path.to_absolute_filename root
              ; target =  Path.to_absolute_filename root }

that is, make the mapping a NOP. If there are some cases where this mapping is desireable, then probably another fix is needed, but this workaround works for my current purposes. Perhaps doing this mapping should be under option or stanza control.

@jserot
Copy link
Author

jserot commented Feb 3, 2023

Thanks.
Should we put a PR for this ?

@richardlford
Copy link
Contributor

I thought I would add a new stanza for the dune-project file called "map_workspace_root", which, if true would enable this behavior, but if false would not do the mapping. I think the mapping is wanted when you want reproducible results independent of where the build is done. But that does not work for the debugger. I will make those changes and create a PR.

An alternate idea would be to base this on whether debug information is being produced. If you want debug information, then it make no sense to produce incorrect debug information.

Yet another idea is that the debugger should somehow recognize the special "/workspace_root" and perhaps if given workspace path, use that. But that is for another time.

For now will add the stanza and make the default be true. Then if you want correct debug information, set it false. Does that seem reasonable? Will also need to document it in the manual.

@jserot
Copy link
Author

jserot commented Feb 3, 2023

Does that seem reasonable?

Yes, sure. This will do the job.

More generally, I think that the debugger support in dune could be improved (making the all thing work is not trivial, esp. for beginners). But, yes, this can wait ;)

Thanks for your help anyway

@richardlford
Copy link
Contributor

I have the changes made to add the new map_workspace_root stanza, but now I'm trying to figure out how to access it from src/dune_engine/action_exec.ml. I would have thought it would be part of the ambient environment, but I've not found it yet.

Note also we could achieve the same result by having Execution_parameters.add_workspace_root_to_build_path_prefix_map return false.

But it is defined in dune_engine/execution_parameters.ml as

let add_workspace_root_to_build_path_prefix_map t = t.dune_version >= (3, 0)

And the execution_parameters type,

type t =
  { dune_version : Dune_lang.Syntax.Version.t
  ; action_stdout_on_success : Action_output_on_success.t
  ; action_stderr_on_success : Action_output_on_success.t
  ; expand_aliases_in_sandbox : bool
  }

does not include a way to get at the dune project.

I will continue looking (learning more about Dune), but do you have any suggestions?

richardlford added a commit to richardlford/dune that referenced this issue Feb 3, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 3, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 3, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Signed-off-by: Richard L Ford <richardlford@gmail.com>

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 6, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Signed-off-by: Richard L Ford <richardlford@gmail.com>

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 7, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Signed-off-by: Richard L Ford <richardlford@gmail.com>

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 7, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Signed-off-by: Richard L Ford <richardlford@gmail.com>

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 8, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Signed-off-by: Richard L Ford <richardlford@gmail.com>

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 8, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Signed-off-by: Richard L Ford <richardlford@gmail.com>

Fixes ocaml#6929.
richardlford added a commit to richardlford/dune that referenced this issue Feb 8, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Richard L Ford <richardlford@gmail.com>
richardlford added a commit to richardlford/dune that referenced this issue Feb 8, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Richard L Ford <richardlford@gmail.com>
richardlford added a commit to richardlford/dune that referenced this issue Feb 9, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Richard L Ford <richardlford@gmail.com>
richardlford added a commit to richardlford/dune that referenced this issue Feb 9, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Richard L Ford <richardlford@gmail.com>
richardlford added a commit to richardlford/dune that referenced this issue Feb 9, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Richard L Ford <richardlford@gmail.com>
emillon added a commit to richardlford/dune that referenced this issue Feb 9, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Richard L Ford <richardlford@gmail.com>
emillon added a commit to richardlford/dune that referenced this issue Feb 9, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Signed-off-by: Richard L Ford <richardlford@gmail.com>
Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
emillon added a commit to richardlford/dune that referenced this issue Feb 9, 2023
…ping.

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes ocaml#6929, provided user disables mapping.

Signed-off-by: Richard L Ford <richardlford@gmail.com>
Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Etienne Millon <etienne.millon@gmail.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
emillon added a commit that referenced this issue Feb 9, 2023
…ping. (#6988)

Add a "map_workspace_root" stanza to the dune-project file.
If true, references to the workspace root directory in output
files are mapped to "/workspace_root". If false, such references
are not modified.
If missing, it defaults to true.

Note that in the added tests, for some configurations quotes
are needed around the "EOF" delimeter to get expansion.

Note also that when enabled, the debug search directories in the
debug information produced by ocamlc are also mapped, with
the result that ocamldebug cannot find the files.

Fixes #6929, provided user disables mapping.

Signed-off-by: Richard L Ford <richardlford@gmail.com>
Co-authored-by: Christine Rose <christinerose@users.noreply.github.com>
Co-authored-by: Ali Caglayan <alizter@gmail.com>
Co-authored-by: Etienne Millon <me@emillon.org>
emillon added a commit to emillon/opam-repository that referenced this issue Feb 13, 2023
…, dune-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info, dune-action-plugin and chrome-trace (3.7.0~alpha3)

CHANGES:

- Add map_workspace_root dune-project stanza to allow disabling of
  mapping of workspace root to /workspace_root. (ocaml/dune#6988, fixes ocaml/dune#6929,
  @richardlford)
emillon added a commit to emillon/opam-repository that referenced this issue Feb 17, 2023
…, dune-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info, dune-action-plugin and chrome-trace (3.7.0)

CHANGES:

- Allow running `$ dune exec` in watch mode (with the `-w` flag). In watch mode,
  `$ dune exec` the executed binary whenever it is recompiled. (ocaml/dune#6966,
  @gridbugs)

- `coqdep` is now called once per theory, instead of one time per Coq
  file. This should significantly speed up some builds, as `coqdep`
  startup time is often heavy (ocaml/dune#7048, @Alizter, @ejgallego)

- Add `map_workspace_root` dune-project stanza to allow disabling of
  mapping of workspace root to `/workspace_root`. (ocaml/dune#6988, fixes ocaml/dune#6929,
  @richardlford)

- Fix handling of support files generated by odoc. (ocaml/dune#6913, @jonludlam)

- Fix parsing of OCaml errors that contain code excerpts with `...` in them.
  (ocaml/dune#7008, @rgrinberg)

- Pre-emptively clear screen in watch mode (ocaml/dune#6987, fixes ocaml/dune#6884, @rgrinberg)

- Fix cross compilation configuration when a context with targets is itself a
  host of another context (ocaml/dune#6958, fixes ocaml/dune#6843, @rgrinberg)

- Fix parsing of the `<=` operator in *blang* expressions of `dune` files.
  Previously, the operator would be interpreted as `<`. (ocaml/dune#6928, @tatchi)

- Fix `--trace-file` output. Dune now emits a single *complete* event for every
  executed process. Unterminated *async* events are no longer written. (ocaml/dune#6892,
  @rgrinberg)

- Fix preprocessing with `staged_pps` (ocaml/dune#6748, fixes ocaml/dune#6644, @rgrinberg)

- Use colored output with MDX when Dune colors are enabled.
  (ocaml/dune#6462, @MisterDA)

- Make `dune describe workspace` return consistent dependencies for
  executables and for libraries. By default, compile-time dependencies
  towards PPX-rewriters are from now not taken into account (but
  runtime dependencies always are). Compile-time dependencies towards
  PPX-rewriters can be taken into account by providing the
  `--with-pps` flag. (ocaml/dune#6727, fixes ocaml/dune#6486, @esope)

- Print missing newline after `$ dune exec`. (ocaml/dune#6821, fixes ocaml/dune#6700, @rgrinberg,
  @Alizter)

- Fix binary corruption when installing or promoting in parallel (ocaml/dune#6669, fixes
  ocaml/dune#6668, @edwintorok)

- Use colored output with GCC and Clang when compiling C stubs. The
  flag `-fdiagnostics-color=always` is added to the `:standard` set of
  flags. (ocaml/dune#4083, @MisterDA)

- Fix the parsing of decimal and hexadecimal escape literals in `dune`,
  `dune-package`, and other dune s-expression based files (ocaml/dune#6710, @shym)

- Report an error if `dune init ...` would create a "dune" file in a location
  which already contains a "dune" directory (ocaml/dune#6705, @gridbugs)

- Fix the parsing of alerts. They will now show up in diagnostics correctly.
  (ocaml/dune#6678, @rginberg)

- Fix the compilation of modules generated at link time when
  `implicit_transitive_deps` is enabled (ocaml/dune#6642, @rgrinberg)

- Allow `$ dune utop` to load libraries defined in data only directories
  defined using `(subdir ..)` (ocaml/dune#6631, @rgrinberg)

- Format dune files when they are named `dune-file`. This occurs when we enable
  the alternative file names project option. (ocaml/dune#6566, @rgrinberg)

- Move `$ dune ocaml-merlin -dump-config=$dir` to `$ dune ocaml merlin
  dump-config $dir`. (ocaml/dune#6547, @rgrinberg)

- Allow compilation rules to be impacted by `(env ..)` stanzas that modify the
  environment or set binaries. (ocaml/dune#6527, @rgrinberg)

- Coq native mode is now automatically detected by Dune starting with Coq lang
  0.7. `(mode native)` has been deprecated in favour of detection from the
  configuration of Coq. (ocaml/dune#6409, @Alizter)

- Print "Leaving Directory" whenever "Entering Directory" is printed. (ocaml/dune#6419,
  fixes ocaml/dune#138, @cpitclaudel, @rgrinberg)

- Allow `$ dune ocaml dump-dot-merlin` to run in watch mode. Also this command
  shouldn't print "Entering Directory" mesages. (ocaml/dune#6497, @rgrinberg)

- `dune clean` should no longer fail under Windows due to the inability to
  remove the `.lock` file. Also, bring the implementation of the global lock
  under Windows closer to that of Unix. (ocaml/dune#6523, @nojb)

- Remove "Entering Directory" messages for `$ dune install`. (ocaml/dune#6513,
  @rgrinberg)

- Stop passing `-q` flag in `dune coq top`, which allows for `.coqrc` to be
  loaded. (ocaml/dune#6848, fixes ocaml/dune#6847, @Alizter)

- Fix missing dependencies when detecting the kind of C compiler we're using
  (ocaml/dune#6610, fixes ocaml/dune#6415, @emillon)

- Allow `(include_subdirs qualified)` for OCaml projects. (ocaml/dune#6594, fixes ocaml/dune#1084,
  @rgrinberg)

- Accurately determine merlin configuration for all sources selected with
  `copy#` and `copy_files#`. The old heuristic of looking for a module in
  parent directories is removed (ocaml/dune#6594, @rgrinberg)

- Fix inline tests with *js_of_ocaml* and whole program compilation mode
  enabled (ocaml/dune#6645, @hhugo)

- Fix *js_of_ocaml* separate compilation rules when `--enable=effects`
  ,`--enable=use-js-string` or `--toplevel` is used. (ocaml/dune#6714, ocaml/dune#6828, ocaml/dune#6920, @hhugo)

- Fix *js_of_ocaml* separate compilation in presence of linkall (ocaml/dune#6832, ocaml/dune#6916, @hhugo)

- Remove spurious build dir created when running `dune init proj ...` (ocaml/dune#6707,
  fixes ocaml/dune#5429, @gridbugs)

- Allow `--sandbox` to affect `ocamldep` invocations. Previously, they were
  wrongly marked as incompatible (ocaml/dune#6749, @rgrinberg)

- Validate the command line arguments for `$ dune ocaml top-module`. This
  command requires one positional argument (ocaml/dune#6796, fixes ocaml/dune#6793, @rgrinberg)

- Add a `dune cache size` command for displaying the size of the cache (ocaml/dune#6638,
  @Alizter)

- Fix dependency cycle when installing files to the bin section with
  `glob_files` (ocaml/dune#6764, fixes ocaml/dune#6708, @gridbugs)

- Handle "Too many links" errors when using Dune cache on Windows (ocaml/dune#6993, @nojb)

- Allow the `cinaps` stanza to set a custom alias. By default, if the alias is
  not set then the cinaps actions will be attached to both `@cinaps` and
  `@runtest` (ocaml/dune#6991, @rgrinberg)

- Add `(using ctypes 0.3)`. When used, paths in `(ctypes)` are interpreted
  relative to where the stanza is defined. (ocaml/dune#6883, fixes ocaml/dune#5325, @emillon)

- Auto-detect `dune-workspace` files as `dune` files in Emacs (ocaml/dune#7061,
  @ilankri)

- Add native support for polling mode on Windows (ocaml/dune#7010, @yams-yams, @nojb)
@rwmjones
Copy link

Is there a way to default map_workspace_root = false without modifying the build? This causes debuginfo to be broken on Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=2168932

@emillon
Copy link
Collaborator

emillon commented Feb 20, 2023

There is not, unfortunately.

At the moment there's a tension between:

  • having reproducible builds (in this particular case, not capturing the path where the package is built)
  • being able to refer to these build paths after the fact (for example when debugging).

At the moment, we provide a switch that allows switching between a reproducible, undebuggable build, and a non-reproducible, debuggable build. Which is obviously not great. Some work might happen in ocamldebug so that the paths can be relocated again at runtime but this does not exist at the moment

Do you know how debug info works in other languages? or for example how it works in Fedora for a native package like libpng? Does it embed some paths in the compiled binary?

@rwmjones
Copy link

Not interested at all in reproducible builds, a solution in search of a problem.

Fedora will use the debug paths to split out the debug information into separate packages along with the source. To find the source it needs to know the correct path.

All we want is some global configuration to override the new behaviour so we don't need to patch every existing package's source.

@nojb
Copy link
Collaborator

nojb commented Feb 20, 2023

It seems reasonable to me to have a switch to control this setting from outside the build (eg by passing a command line option to Dune or by using an environment variable).

In fact I'm not sure dune-project is the right place for the stanza in #6988. After all, it is not very useful for a single project to set this setting: you would typically want this setting to be set in all the projects in your workspace.

In other words, I propose to move the map_workspace_root stanza to dune-workspace and allow specifying it also on the command-line of Dune and via an environment variable (which would solve @rwmjones' problem). Note that this is exactly how we specify instrumentation settings.

@nojb
Copy link
Collaborator

nojb commented Feb 20, 2023

In other words, I propose to move the map_workspace_root stanza to dune-workspace and allow specifying it also on the command-line of Dune and via an environment variable (which would solve @rwmjones' problem). Note that this is exactly how we specify instrumentation settings.

Incidentally, the name map_workspace_root appearing in a dune-project file should have tipped us off that there was something fishy here.

@Alizter
Copy link
Collaborator

Alizter commented Feb 20, 2023

Has an issue been submitted upstream to ocamldebug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment