support third-party parse transforms
It should be possible to configure the compiler so that it can use 3rd party parse transforms.
This should be as simple as providing a way to specify the external library and let the builder have it added to the code path.
This should be as simple as providing a way to specify the external library and let the builder have it added to the code path.
Leave a comment
on 2011-05-25 05:02 *
By Vlad Dumitrescu
2011/5/25 Damian Dobroczyński <qoocku@gmail.com>
1st) Still, I'm not sure which directory is the working directory of the
compilation (or compiler since I do not know if the external "erlc" tool
is invoked or compile module is used internally). Is it workspace
directory? ERTS directory? My suggestions is the directory should be the
project directory. It would greatly help with setting additional include
directories ("{i, Dir}") in a more or less portable way independent on a
project current location.
We are using an Erlang runtime and call compile:file via RPC. The runtime is shared between projects (if you have several in your workspace), which means that the working directory must not be relevant to the compiler configuration.
Currently we have a simpleminded compiler configuration, but when it's going to be fixed there should not be a problem to specify paths relative to the project, in the same way as we do for source directories, for example.
2nd) Looking at the reference manual of the "erlc" tool I see some
command line arguments which may be helpfull in the parse_transform case
and other cases: "-pa" and "-pz". That means custom "ebin" directory
addition to the default ones (code:add_path(a|z)/1). It might be
included in the compiler options like it's designed right now in the
project compilation preferences page. Unfortunately "compile:file/2"
options set has no option that is similar to "-pa"/"-pz" command line
arguments.
These must be set with code:add_path before compilation. Sharing the compilation runtime might again create complications (if one has two unrelated projects in the workspace, the module names could clash).
3rd) There is "Extra args" in the Erlang->Installed runtimes-><Runtime>
properties page. Does it work? I've tried to do something like this:
-env ERL_LIBS "....."
to add more library directories for the VM but it does not seem to work.
We have tested this feature with only a few values (as needed at the time), so it may be broken. I will add a ticket for that too.
We have got requirements from other users about the compilation and we plan to work on it soon. It will be possible to use an external process (erlc or a make script or something else) to build, provided someone writes an adapter for it (configurator + parser for errors/warnings). I hope to be able to work on it this summer.
1st) Still, I'm not sure which directory is the working directory of the
compilation (or compiler since I do not know if the external "erlc" tool
is invoked or compile module is used internally). Is it workspace
directory? ERTS directory? My suggestions is the directory should be the
project directory. It would greatly help with setting additional include
directories ("{i, Dir}") in a more or less portable way independent on a
project current location.
We are using an Erlang runtime and call compile:file via RPC. The runtime is shared between projects (if you have several in your workspace), which means that the working directory must not be relevant to the compiler configuration.
Currently we have a simpleminded compiler configuration, but when it's going to be fixed there should not be a problem to specify paths relative to the project, in the same way as we do for source directories, for example.
2nd) Looking at the reference manual of the "erlc" tool I see some
command line arguments which may be helpfull in the parse_transform case
and other cases: "-pa" and "-pz". That means custom "ebin" directory
addition to the default ones (code:add_path(a|z)/1). It might be
included in the compiler options like it's designed right now in the
project compilation preferences page. Unfortunately "compile:file/2"
options set has no option that is similar to "-pa"/"-pz" command line
arguments.
These must be set with code:add_path before compilation. Sharing the compilation runtime might again create complications (if one has two unrelated projects in the workspace, the module names could clash).
3rd) There is "Extra args" in the Erlang->Installed runtimes-><Runtime>
properties page. Does it work? I've tried to do something like this:
-env ERL_LIBS "....."
to add more library directories for the VM but it does not seem to work.
We have tested this feature with only a few values (as needed at the time), so it may be broken. I will add a ticket for that too.
We have got requirements from other users about the compilation and we plan to work on it soon. It will be possible to use an external process (erlc or a make script or something else) to build, provided someone writes an adapter for it (configurator + parser for errors/warnings). I hope to be able to work on it this summer.
on 2011-08-24 05:18 *
By Vlad Dumitrescu
Updating tickets (#802, #52, #64, #460, #720, #749, #769, #775, #776, #786, #851, #83, #93, #149, #157, #163, #179, #194, #195, #222, #228, #274, #281, #283, #285, #335, #339, #349, #351, #358, #364, #373, #375, #379, #383, #401, #405, #409, #411, #413, #422, #424, #425, #428, #434, #442, #443, #449, #450, #454, #471, #479, #492, #523, #535, #537, #543, #561, #564, #574, #590, #598, #599, #603, #610, #615, #619, #632, #634, #636, #639, #640, #641, #642, #643, #645, #658, #660, #662, #664, #665, #674, #677, #684, #685, #688, #689, #693, #694, #695, #696, #699, #700, #707, #709, #719, #736, #743, #744, #746, #748, #759, #760, #761, #762, #774, #778, #780, #788, #789, #796, #798, #799, #800, #803, #809, #812, #813, #816, #820, #822, #829, #836, #837, #840, #841, #842, #848, #849, #850, #853, #854, #855, #856, #857, #860, #867, #868, #871, #872, #873, #875, #41, #159, #372, #429, #489, #577, #601, #622, #667, #679, #767, #768, #772, #785, #771)
on 2011-09-27 06:35 *
By Vlad Dumitrescu
Component changed from None to code model
Component changed from None to code model
on 2013-01-22 09:10 *
By Vlad Dumitrescu
Found in version changed from 0.13.0 to -none-
Milestone changed from backlog to after v1.0
Found in version changed from 0.13.0 to -none-
Milestone changed from backlog to after v1.0