-
Notifications
You must be signed in to change notification settings - Fork 70
Add Java module definitions #1028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
9d09351
90f6afd
540b34f
5578296
bef314b
b4df08f
acfc706
0c5f718
05fde32
16e15d5
f0e696c
37c316e
b908177
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| module com.dylibso.chicory.annotations { | ||
| exports com.dylibso.chicory.annotations; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| module com.dylibso.chicory.build.time.compiler { | ||
| requires transitive com.dylibso.chicory.compiler; | ||
| requires com.dylibso.chicory.runtime; | ||
| requires com.dylibso.chicory.wasm; | ||
| requires com.github.javaparser.core; | ||
|
|
||
| exports com.dylibso.chicory.build.time.compiler; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| module com.dylibso.chicory.compiler { | ||
| requires transitive com.dylibso.chicory.runtime; | ||
| requires transitive com.dylibso.chicory.wasm; | ||
| requires org.objectweb.asm; | ||
| requires org.objectweb.asm.commons; | ||
| requires org.objectweb.asm.util; | ||
|
|
||
| exports com.dylibso.chicory.compiler; | ||
| exports com.dylibso.chicory.compiler.internal; | ||
| exports com.dylibso.chicory.experimental.aot; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| module com.dylibso.chicory.log { | ||
| requires static com.google.errorprone.annotations; | ||
| requires static java.logging; | ||
|
|
||
| exports com.dylibso.chicory.log; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -369,6 +369,11 @@ | |
| <artifactId>maven-antrun-plugin</artifactId> | ||
| <version>${maven-antrun-plugin.version}</version> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-checkstyle-plugin</artifactId> | ||
| <version>${maven-checkstyle-plugin.version}</version> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-clean-plugin</artifactId> | ||
|
|
@@ -482,6 +487,10 @@ | |
| <excludeGeneratedSources>true</excludeGeneratedSources> | ||
| <checkstyleRules> | ||
| <module name="Checker"> | ||
| <module name="BeforeExecutionExclusionFileFilter"> | ||
| <!-- checkstyle does not support module-info files (checkstyle issue 8240) --> | ||
| <property name="fileNamePattern" value="module\-info\.java$"/> | ||
| </module> | ||
|
Comment on lines
+490
to
+493
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why exactly is checkstyle failing on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. module-info is wholly unsupported by checkstyle, so this is the recommended configuration (per their docs) to skip it.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. I'd put a comment in here to that effect though. |
||
| <module name="FileTabCharacter"> | ||
| <property name="fileExtensions" value="java,xml"/> | ||
| </module> | ||
|
|
@@ -541,6 +550,13 @@ | |
| </module> | ||
| </checkstyleRules> | ||
| </configuration> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.puppycrawl.tools</groupId> | ||
| <artifactId>checkstyle</artifactId> | ||
| <version>${checkstyle.version}</version> | ||
| </dependency> | ||
| </dependencies> | ||
| <executions> | ||
| <execution> | ||
| <id>checkstyle</id> | ||
|
|
@@ -681,6 +697,23 @@ | |
| <java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file> | ||
| </systemPropertyVariables> | ||
| </configuration> | ||
| <executions> | ||
| <execution> | ||
| <id>default-test</id> | ||
| <configuration> | ||
| <useModulePath>false</useModulePath> | ||
| </configuration> | ||
| </execution> | ||
| <execution> | ||
| <id>test-module-path</id> | ||
| <goals> | ||
| <goal>test</goal> | ||
| </goals> | ||
| <configuration> | ||
| <useModulePath>true</useModulePath> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
@@ -749,11 +782,23 @@ | |
| <activation> | ||
| <jdk>11</jdk> | ||
| </activation> | ||
| <properties> | ||
| <checkstyle.skip>true</checkstyle.skip> | ||
| </properties> | ||
| <build> | ||
| <plugins> | ||
| <!-- disable checkstyle --> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-checkstyle-plugin</artifactId> | ||
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> | ||
| <dependencies/> | ||
| <executions> | ||
| <execution> | ||
| <id>checkstyle</id> | ||
| <phase>none</phase> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <!-- disable Error Prone --> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module com.dylibso.chicory.runtime { | ||
| requires transitive com.dylibso.chicory.wasm; | ||
|
|
||
| exports com.dylibso.chicory.runtime; | ||
| exports com.dylibso.chicory.runtime.alloc; | ||
| exports com.dylibso.chicory.runtime.internal; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is surprising
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed by approval tests apparently, we should make sure this configuration only apply during tests