mirage / functoria

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

If `config_file` is changed, update the dune.config #195

Closed djs55 closed 2 years ago

djs55 commented 4 years ago

For example

$ cd mirage-skeleton/tutorial/noop
$ mv config.ml config_test.ml
$ mirage configure -f config_test.ml

Previously I would see:

File "dune.config", line 5, characters 8-14:
5 |   (name config)
            ^^^^^^
Error: Module "Config" doesn't exist.
run ['dune' 'exec' '--root' '/home/djs/djs55/mirage-skeleton/tutorial/noop'
     '--' './config.exe' 'configure' '-f' 'config_test.ml']: exited with 1

The dune.config file has:

;; auto-generated by 'mirage configure -- remove these comments to
;; preserve the file after a `mirage clean`

(executable
  (name config)
  (flags (:standard -warn-error -A))
  (modules config_test)
  (libraries mirage))

I think we need to update the name (and the final .exe) if the config_file is changed.

Signed-off-by: David Scott dave@recoil.org

samoht commented 2 years ago

Thanks!