waneck / testrepo

0 stars 0 forks source link

Issue 1491 - Build Script - haxe #1491

Open waneck opened 11 years ago

waneck commented 11 years ago

[Google Issue #1491 : http://code.google.com/haxe/issues/detail?id=1491] by ncanna...@gmail.com, at 2013-02-16T11:20:36.000Z Adding a facility to run a build script using the macro engine after successful compilation.

Currently this is done with -cmd but is a bit limited.

This can be done either with adding -build MyBuildScript (or -build only with a standardized name)

Or maybe automatically if there's an BuildScript.hx in the classpath ?

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2013-02-16T11:23:13.000Z]

waneck commented 11 years ago

[comment from back2dos@gmail.com, published at 2013-02-16T15:33:26.000Z] How would such a script look? Is it just a class with a main function that gets executed after all building is done?

What additional API is exposed? Things that might be useful

In which context is the build script compiled? Is it "in-macro"? Or can one think of it as compiled separately and then run on the interpreter?

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2013-02-16T19:01:04.000Z] Yes it be executed using the macro context and will have access to all the haxe.macro.Compiler things.

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2013-02-17T09:19:20.000Z]

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2013-02-18T08:44:06.000Z] Issue 1471 has been merged into this issue.

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2013-02-24T17:12:14.000Z]

waneck commented 11 years ago

[comment from pop.atry@gmail.com, published at 2013-03-27T11:46:44.000Z] I prefer a command line option. How about naming it to --post-build and --pre-build(replacing --macro)?

waneck commented 11 years ago

[comment from andy@onthewings.net, published at 2013-04-05T17:41:25.000Z] I noticed that there is "--run" added in r1611. How is that different from "--interp" or the proposed "-build" here? It is not documented anywhere, not in "haxe --help" nor http://haxe.org/doc/compiler

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2013-04-05T19:27:53.000Z] --run takes parameters. So you can do for instance :

haxe --run tools.haxelib.Main install

waneck commented 11 years ago

[comment from andy@onthewings.net, published at 2013-04-06T09:34:40.000Z] Is there any reason that, one would use "--interp" instead of "--run" in some cases? Or can we merge them and keep one only?