ocaml / dune

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

Make (interface) optional in (dialect) #7776

Closed aantron closed 1 year ago

aantron commented 1 year ago

Desired Behavior

We would like to recommend Dune (dialect) for converting eml files to ML, which would be a major improvement (see https://github.com/aantron/dream/pull/228). However, this currently requires boilerplate like this in dune-project:

(lang dune 2.0)

(dialect
 (name eml)
 (implementation
  (extension eml)
  (preprocess (run %{bin:dream_eml} --stdout %{input-file})))
 (interface
  (extension emli)
  (format (run cat))))

However, there are no emli files -- eml is concerned only with the expression language of ML. The (interface) stanza here is completely redundant. We would like to have something like...

Example

(lang dune 2.0)

(dialect
 (name eml)
 (implementation
  (extension eml)
  (preprocess (run %{bin:dream_eml} --stdout %{input-file}))))

...which should be much less confusing for Dream's users, and also would avoid any potential entanglements with actual emli files that may exist for some reason (it's cleaner).

nojb commented 1 year ago

Is this the same issue that is addressed in #7757? And what with is the relation with #7777?

emillon commented 1 year ago

Yes, I marked #7757 as fixing this.