Skip to content

Conversation

@rgrinberg
Copy link
Member

@rgrinberg rgrinberg commented Oct 19, 2025

Saves us from using as_in_source_tree_exn and also prepares us from passing this directory to the stanza parser.

As a side effect, let's fix the issue of turning absolute paths into source paths and allow dune init to work on absolute paths

@rgrinberg rgrinberg requested a review from Alizter October 19, 2025 16:51
@rgrinberg rgrinberg force-pushed the dune-init-source-path branch from eabc18c to 48915ce Compare October 19, 2025 16:52
@rgrinberg rgrinberg linked an issue Oct 19, 2025 that may be closed by this pull request
Signed-off-by: Rudi Grinberg <[email protected]>
Removes unnecesasry as_exn calls. Also needed for a subsequent PR which
will require passing the dir to parse the stanzas.

Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg rgrinberg force-pushed the dune-init-source-path branch from 48915ce to d2458d1 Compare October 20, 2025 12:38
@rgrinberg rgrinberg enabled auto-merge (squash) October 20, 2025 12:50
@rgrinberg rgrinberg merged commit 5724d33 into ocaml:main Oct 20, 2025
47 of 48 checks passed
davesnx added a commit to davesnx/dune that referenced this pull request Oct 22, 2025
…without-system

* 'main' of github.com:/ocaml/dune: (33 commits)
  Fix difference between bootstrap & dune behaviour w.r.t include-subdirs ambiguity (ocaml#12607)
  Revert "Fix difference between bootstrap & dune behaviour w.r.t include-subdirs ambiguity"
  fix(include-subdirs-qualified): prefer closer module of the same name
  Add 2 tests showing difference between bootstrap & dune w.r.t include-subdirs
  dune init: use source path (ocaml#12601)
  chore(deps): bump actions/setup-node from 5 to 6
  test(melange): show melange compilation isn't part of `@all` alias (ocaml#12603)
  Disable flaky test (ocaml#12600)
  Rename path to dir in dune_init (ocaml#12599)
  Dune project: remove dead code (ocaml#12598)
  Dune_project refactor (ocaml#12597)
  doc(melange): reference `dirs` stanza (ocaml#12596)
  Stanza simplifications (ocaml#12595)
  Reduce stanza definition boilerplate (ocaml#12592)
  Rename Stanza_common to Stanza_pkg (ocaml#12593)
  Remove copied code between library and library_parameter stanzas (ocaml#12594)
  Split modules settings (ocaml#12591)
  Move the (include_subdirs qualified) check to a single place (ocaml#12590)
  refactor: simplify loc/ocamllex/ocamlyacc stanza handling (ocaml#12589)
  pkg: Implement a package search command
  ...
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.

dune init project crashes with an absolute directory

2 participants