You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on May 27, 2019. It is now read-only.
I want to make a standalone binary so it is easier to use in other projects. I used rebar escriptize in c5f15ec, which worked to generate a standalone binary, except that isn't enough.
The parse transform we have in include/espec.hrl also needs to be shared in the other projects, as spec files include it at the top.
We need to find a way to either not require this to be included and have the espec command do the work, or for the espec command to add this to the lib path before running specs (I guess it could write a temporary directory, then add that to the lib path).
Ok, after lots of brain frying I think we can use epp:parse_file/3. It returns a list of tokens, that you can pass to compile:forms, which returns the binary code. It also takes a parameter of user defined macros (thats the only stuff we need in espec.hrl, the rest can be passed as compile time options).
However, I have no idea what format these take 😄 The docs aren't particularly helpful on this:
Activity
lucaspiller commentedon Apr 27, 2013
Ok, after lots of brain frying I think we can use
epp:parse_file/3. It returns a list of tokens, that you can pass tocompile:forms, which returns the binary code. It also takes a parameter of user defined macros (thats the only stuff we need inespec.hrl, the rest can be passed as compile time options).However, I have no idea what format these take 😄 The docs aren't particularly helpful on this:
http://www.erlang.org/doc/man/epp.html#type-macros
Add espec library