Fan’s development guide

Build system

Fan currently use omake , there are several relevant omakefiles:
  • Root.om

  • Configure.om

  • OMakeroot

  • OCaml.om Add a general rule to support Fan

    public.USE_FAN       = false
    public.FAN_PLUGINS   =
    public.FAN           = fan
    public.FAN_PLUGIN_OPTIONS  = $`(mapprefix -plugin, $(FAN_PLUGINS))
    
  • OMakefile

  • ./pmake a simple omake wrapper with parallel

Targets

  • fan(.run) cold start, build fan from preprocessed files
  • coldtop fan toplevel FIXME
  • ftop fan toplevel with utop support
  • fan0(.run)
  • fan1
  • fan2
  • snapshot

Known issues

When you add a new file , and the build system can not track the dependency correctly, fore example

Unbound module Ast_gen

Try to pmake clean and build it again.

Test its correctness

Todo

when to bootstrapp?

how to test changes is right

  • at least –> hotbuild -> snapshot(source 1) –> cold build –> hot build –> snapshot (source 2)

    source(1,2) should reach a fix point, it means we can keep the loop

  • unittest