Branch: Tag:

2018-04-18

2018-04-18 22:37:54 by Pontus Östlund <ponost@roxen.com>

Hot reload: Support a list of comma separated modules.

It's also possible to specify for which configuration the module/s should be hot reloaded.

--module-hot-reload=mod1[,mod2[,mod3[, ...]]]
--module-hot-reload-conf=conf1[,conf2[,conf3[ ...]]]

107:   //! @tt{--module-hot-reload=<modname>@}.   {    if (hot_reload_modules) { -  return map(hot_reload_modules/" ", String.trim_all_whites) - ({ "" }); +  return map(replace(hot_reload_modules, " ", ",")/",", +  String.trim_all_whites) - ({ "" });    }       return ({});   } -  +  + array(string) query_hot_reload_modules_conf() + //! Returns an array of modules added for hot reloading via + //! @tt{--module-hot-reload-conf=<conf>@}. + { +  if (hot_reload_modules_conf) { +  return map(replace(hot_reload_modules_conf, " ", ",")/",", +  String.trim_all_whites) - ({ "" }); +  } +  +  return 0; + }   //! @endignore      array(string|int) filename_2 (program|object o)
153:   protected int once_mode;   // String of modules added for hot reloading via --module-hot-reload=<mod>   protected string hot_reload_modules; + protected string hot_reload_modules_conf;      // Note that 2.5 is a nonexisting version. It's only used for the   // cache static optimization for tags such as <if> and <emit> inside
6677:       once_mode = (int)Getopt.find_option(argv, "o", "once");    hot_reload_modules = Getopt.find_option(argv, 0, "module-hot-reload"); +  hot_reload_modules_conf = Getopt.find_option(argv, 0, "module-hot-reload-conf");       configuration_dir =    Getopt.find_option(argv, "d",({"config-dir","configuration-directory" }),