groovy
  1. groovy
  2. GROOVY-1735 Build a compiler that can handle Groovy and Java source code
  3. GROOVY-1951

build a compiler that can compile mixed groovy and java code on the command line

    Details

    • Type: Sub-task Sub-task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta-2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      by generating stubs for the groovy files it is possible to let the java files compile without using the real groovy files, but java files, that are equal enough to produce compatible bytecode. the Groovy compiler will then compile the .groovy files, which overwrites the .class files generated from the stubs. This way it is not possible to compile groovy files that are not part of the list of files to compile. That means for example if I do "groovyc C.groovy B.java" and B.java depends on a file A.groovy, then this will not compile, because the groovy compiler is not able to reuse the information of the java compiler that a lookup for a A.groovy is needed. Instead. to compile this, "groovyc A.groovy B.java C.groovy" is needed. All files must be known before. This is also the reason that this solution will not compile at runtime, because a discovery mechanism for java files depending on groovy files would be needed and that is not doable by stubs, not wihtout additional information provided by the compiler.

        Activity

          People

          • Assignee:
            blackdrag blackdrag
            Reporter:
            blackdrag blackdrag
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: