mirage / functoria

A DSL to invoke otherworldly functors
ISC License
63 stars 21 forks source link

Update names #174

Closed samoht closed 4 years ago

samoht commented 4 years ago
samoht commented 4 years ago

/cc @hannesm for feedback

hannesm commented 4 years ago

looks fine to me (sorry for my slow response), re-reading #167 and #171, I have questions:

(sorry, I should likely just pin functoria{-runtime} and test it with mirage 3.5.1 ;)

thanks for your (esp. @TheLortex) work on this!

samoht commented 4 years ago
hannesm commented 4 years ago

that all sounds excellent to me -- yes, I'm in favour of generating less code/symlinks/files (it's always a burden if you want to modify things or get errors in the generated stuff). cool!

hannesm commented 4 years ago

with the current state, is the symlink only done if the file does not exist (yet)? (same for dune -- it should imho only be generated if its not present or was previously generated and has not been modified (and has changed) <- that's a bit hard to figure out programmatically, but would allow us to get rid of the dune.config).

samoht commented 4 years ago

Currently mirage configure overwrite any existing config/config.ml which kind of makes sense as mirage clean removes everything anyway. I agree that it's probably be better to not do this in the future, but we will need to fix mirage clean as well.

samoht commented 4 years ago

For using multiple files and using external libraries, you can create a dune.config file with the following contents:

;; copy additional files
(rule (copy# ../foo.ml foo.ml))

(library
  (name mirage_config)
  (wrapped false)
  (modules foo)
  (libraries <external libraries>))

If you don't care about new files, just use:

(library
  (name mirage_config)
  (modules)
  (libraries <external libraries>))