Hints for maintainers of Frege build tools

21 views
Skip to first unread message

Ingo W.

unread,
May 2, 2018, 4:24:24 PM5/2/18
to Frege Programming Language
Hello friends,

as of recently, the Frege compiler with the -make option not only discovers the Frege dependencies, but also the Java classes that must be present prior compilation of a Frege module.

This solves (so I hope) a long standing problem: In a mixed Frege-Java project we have 3 kinds of source files:

a) Java code that gets called by Frege
b) Frege code
c) Java code that calls Frege code.

(option d) Java code that is called by Frege and calls back into yet to be get compiled Frege code cannot be handled at present. Don't do that!)

Hence,for a build tool,  it was impossible to decide what to do first: compile Java or compile Frege.

This should now work by first compiling Frege using the -make option and giving the path(s) where the java code that gets called resides in the -sp option.
Afterwards, compile Java.

Hence in a first approximation, when we just have

   src/main/frege/....
   src/main/java/...

compile Frege first with "-make -sp src/main/frege:src/main/java/"
If this succeeds, those java files will be already compiled that belong to category a).
Afterwards, compile the remaining files in src/man/java. It souldn't matter if the already compiled java files will be compiled again.

better yet: put the java files that are needed by frege code in an extra directory to avoid re-compilation.

Regards, Ingo

Reply all
Reply to author
Forward
0 new messages