-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle annotations in classfile parser
fixes sbt#630
- Loading branch information
Showing
15 changed files
with
231 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-a/Foo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package test; | ||
@Test | ||
public class Foo { } |
3 changes: 3 additions & 0 deletions
3
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-a/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package test; | ||
public @interface Test { | ||
} |
4 changes: 4 additions & 0 deletions
4
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-a/changes/Test1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package test; | ||
public @interface Test { | ||
int x() default 0; | ||
} |
2 changes: 2 additions & 0 deletions
2
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-a/incOptions.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# turn off pipelining because compileAllJava over-compiles | ||
pipelining = false |
11 changes: 11 additions & 0 deletions
11
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-a/test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Verifies that changes to annotations in upstream Java sources causes | ||
# recompilation downstream (sbt/zinc#630) | ||
|
||
> compile | ||
> checkDependencies test.Foo: test.Test | ||
> checkRecompilations 0 test.Test test.Foo | ||
|
||
$ copy-file changes/Test1.java Test.java | ||
> compile | ||
> checkRecompilations 1 test.Test | ||
> checkRecompilations 2 test.Foo |
7 changes: 7 additions & 0 deletions
7
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-b/Foo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package test; | ||
@Test | ||
public class Foo { | ||
public static void main(String[] args){ | ||
System.out.println(Foo.class.getAnnotations().length); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-b/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package test; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
//@Retention(RetentionPolicy.RUNTIME) | ||
public @interface Test { | ||
} |
7 changes: 7 additions & 0 deletions
7
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-b/changes/Test1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package test; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface Test { | ||
} |
2 changes: 2 additions & 0 deletions
2
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-b/incOptions.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# turn off pipelining because compileAllJava over-compiles | ||
pipelining = false |
11 changes: 11 additions & 0 deletions
11
zinc/src/sbt-test/source-dependencies/annotations-in-java-sources-b/test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Verifies that changes to annotations in upstream Java sources causes | ||
# recompilation downstream (sbt/zinc#630) | ||
|
||
> compile | ||
> checkDependencies test.Foo: test.Test | ||
> checkRecompilations 0 test.Test test.Foo | ||
|
||
$ copy-file changes/Test1.java Test.java | ||
> compile | ||
> checkRecompilations 1 test.Test | ||
> checkRecompilations 2 test.Foo |