commits
Each file kind (File, Project, Workspace, Package) is now a self-
contained module with abstract t and the standard six-verb IO shape
(of_string / of_string_exn / to_string / of_reader / of_reader_exn /
to_writer). Sexp.t no longer appears in any signature; Dune.Error is
aliased from Sexp.Error.
- Project.t, Workspace.t, File.t made abstract; their old record
exposures (packages : Sexp.t list, env : Sexp.t option, etc.) are
now internal. Round-trip via the codec preserves unrecognized
stanzas.
- Project.Package is a typed view of a (package ...) stanza
(name / synopsis / depends).
- Workspace.Context.kind drops the (Other of Sexp.t) leak; unrecognized
context shapes still round-trip via the codec but are filtered out
of Workspace.contexts.
- File.t internally classifies stanzas (Library / Executable / Test /
Other) so library_names / private_library_names / executable_names /
test_names are typed projections, not Sexp tree walks.
- Dune.Package.libraries reads every (library ...) stanza from a
dune-package file; Sexp.Codec.decode_value stays internal.
- ?indent:int now visibly affects to_string: lists with non-atom
children wrap, single-child and atom-only lists <=4 stay inline.
Drops the old public Sexp-level helpers (parse, to_sexps, per-module
to_string, field / fields / field_atom / field_list / field_atoms /
set_field / remove_field, the library/executable/test builders,
pp_dune, to_string_dune, find_stanza, ...). The functionality lives
internally where each module needs it.
Caller migrations:
- monopam/lib/lint.ml: Dune.File.parse -> Dune.File.of_string.
- ocaml-dune/test/test_dune.ml rewritten against the new API.
README rewritten using the new API; mdx libraries reduces to
(libraries nox-dune) -- no nox-sexp leak.
Each file kind (File, Project, Workspace, Package) is now a self-
contained module with abstract t and the standard six-verb IO shape
(of_string / of_string_exn / to_string / of_reader / of_reader_exn /
to_writer). Sexp.t no longer appears in any signature; Dune.Error is
aliased from Sexp.Error.
- Project.t, Workspace.t, File.t made abstract; their old record
exposures (packages : Sexp.t list, env : Sexp.t option, etc.) are
now internal. Round-trip via the codec preserves unrecognized
stanzas.
- Project.Package is a typed view of a (package ...) stanza
(name / synopsis / depends).
- Workspace.Context.kind drops the (Other of Sexp.t) leak; unrecognized
context shapes still round-trip via the codec but are filtered out
of Workspace.contexts.
- File.t internally classifies stanzas (Library / Executable / Test /
Other) so library_names / private_library_names / executable_names /
test_names are typed projections, not Sexp tree walks.
- Dune.Package.libraries reads every (library ...) stanza from a
dune-package file; Sexp.Codec.decode_value stays internal.
- ?indent:int now visibly affects to_string: lists with non-atom
children wrap, single-child and atom-only lists <=4 stay inline.
Drops the old public Sexp-level helpers (parse, to_sexps, per-module
to_string, field / fields / field_atom / field_list / field_atoms /
set_field / remove_field, the library/executable/test builders,
pp_dune, to_string_dune, find_stanza, ...). The functionality lives
internally where each module needs it.
Caller migrations:
- monopam/lib/lint.ml: Dune.File.parse -> Dune.File.of_string.
- ocaml-dune/test/test_dune.ml rewritten against the new API.
README rewritten using the new API; mdx libraries reduces to
(libraries nox-dune) -- no nox-sexp leak.