Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Truffle] Experiment with the OM DSL in separate JARs.
Browse files Browse the repository at this point in the history
chrisseaton committed Sep 21, 2015
1 parent 6986805 commit e06bdf6
Showing 19 changed files with 251 additions and 29 deletions.
2 changes: 1 addition & 1 deletion pom.rb
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@
'test-unit.version' => '3.0.3',
'power_assert.version' => '0.2.3' )

modules [ 'truffle', 'core', 'lib' ]
modules [ 'truffle', 'truffle-om-dsl-api', 'truffle-om-dsl-processor', 'core', 'lib' ]

plugin_management do
jar( 'junit:junit:4.11',
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -85,6 +85,8 @@ DO NOT MODIFIY - GENERATED CODE
</mailingLists>
<modules>
<module>truffle</module>
<module>truffle-om-dsl-api</module>
<module>truffle-om-dsl-processor</module>
<module>core</module>
<module>lib</module>
</modules>
39 changes: 39 additions & 0 deletions truffle-om-dsl-api/pom.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version = File.read( File.join( basedir, '..', 'VERSION' ) ).strip
project 'JRuby Truffle OM DSL API' do

model_version '4.0.0'
inherit 'org.jruby:jruby-parent', version
id 'org.jruby:jruby-truffle-om-dsl-api'

properties( 'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => true,

'jruby.basedir' => '${basedir}/..' )

jar 'org.jruby:jruby-core', '${project.version}', :scope => 'provided'

jar 'com.oracle:truffle:0.7'

plugin( :compiler,
'encoding' => 'utf-8',
'debug' => 'true',
'verbose' => 'false',
'showWarnings' => 'true',
'showDeprecation' => 'true',
'source' => [ '${base.java.version}', '1.7' ],
'target' => [ '${base.javac.version}', '1.7' ],
'useIncrementalCompilation' => 'false' ) do
execute_goals( 'compile',
:id => 'anno',
:phase => 'process-resources',
'compilerArgs' => [ '-XDignore.symbol.file=true',
'-J-ea' ] )
end

plugin :shade do
execute_goals( 'shade',
:id => 'create lib/jruby-truffle-om-dsl.jar',
:phase => 'package',
'outputFile' => '${jruby.basedir}/lib/jruby-truffle-om-dsl.jar' )
end
end
86 changes: 86 additions & 0 deletions truffle-om-dsl-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT MODIFIY - GENERATED CODE
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.2.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-truffle-om-dsl-api</artifactId>
<name>JRuby Truffle OM DSL API</name>
<properties>
<jruby.basedir>${basedir}/..</jruby.basedir>
<polyglot.dump.readonly>true</polyglot.dump.readonly>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
</properties>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>truffle</artifactId>
<version>0.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>anno</id>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<compilerArgs>
<compilerArg>-XDignore.symbol.file=true</compilerArg>
<compilerArg>-J-ea</compilerArg>
</compilerArgs>
</configuration>
</execution>
</executions>
<configuration>
<encoding>utf-8</encoding>
<debug>true</debug>
<verbose>false</verbose>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>${base.java.version}</source>
<source>1.7</source>
<target>${base.javac.version}</target>
<target>1.7</target>
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>create lib/jruby-truffle-om-dsl.jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile>${jruby.basedir}/lib/jruby-truffle-om-dsl.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.ObjectType;
import org.jruby.truffle.om.dsl.processor.OMProcessor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -190,10 +189,6 @@
* inherit the object type of the inherited shape.
*
* The class used should have empty constructor that is protected or more visible.
*
* <p><strong>Processing</strong></p>
*
* {@link Layout} annotations are processed by {@link OMProcessor}.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.CLASS)
32 changes: 32 additions & 0 deletions truffle-om-dsl-processor/pom.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version = File.read( File.join( basedir, '..', 'VERSION' ) ).strip
project 'JRuby Truffle OM DSL Processor' do

model_version '4.0.0'
inherit 'org.jruby:jruby-parent', version
id 'org.jruby:jruby-truffle-om-dsl-processor'

properties( 'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => true,

'jruby.basedir' => '${basedir}/..' )

jar 'org.jruby:jruby-truffle-om-dsl-api', '${project.version}', :scope => 'provided'

jar 'com.oracle:truffle:0.7'

plugin( :compiler,
'encoding' => 'utf-8',
'debug' => 'true',
'verbose' => 'false',
'showWarnings' => 'true',
'showDeprecation' => 'true',
'source' => [ '${base.java.version}', '1.7' ],
'target' => [ '${base.javac.version}', '1.7' ],
'useIncrementalCompilation' => 'false' ) do
execute_goals( 'compile',
:id => 'anno',
:phase => 'process-resources',
'compilerArgs' => [ '-XDignore.symbol.file=true',
'-J-ea' ] )
end
end
71 changes: 71 additions & 0 deletions truffle-om-dsl-processor/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT MODIFIY - GENERATED CODE
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.2.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-truffle-om-dsl-processor</artifactId>
<name>JRuby Truffle OM DSL Processor</name>
<properties>
<jruby.basedir>${basedir}/..</jruby.basedir>
<polyglot.dump.readonly>true</polyglot.dump.readonly>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
</properties>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-truffle-om-dsl-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>truffle</artifactId>
<version>0.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>anno</id>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<compilerArgs>
<compilerArg>-XDignore.symbol.file=true</compilerArg>
<compilerArg>-J-ea</compilerArg>
</compilerArgs>
</configuration>
</execution>
</executions>
<configuration>
<encoding>utf-8</encoding>
<debug>true</debug>
<verbose>false</verbose>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>${base.java.version}</source>
<source>1.7</source>
<target>${base.javac.version}</target>
<target>1.7</target>
<useIncrementalCompilation>false</useIncrementalCompilation>
</configuration>
</plugin>
</plugins>
</build>
</project>
11 changes: 4 additions & 7 deletions truffle/pom.rb
Original file line number Diff line number Diff line change
@@ -11,6 +11,8 @@
'jruby.basedir' => '${basedir}/..' )

jar 'org.jruby:jruby-core', '${project.version}', :scope => 'provided'
jar 'org.jruby:jruby-truffle-om-dsl-processor', '${project.version}', :scope => 'provided'
jar 'org.jruby:jruby-truffle-om-dsl-api', '${project.version}', :scope => 'provided'

jar 'com.oracle:truffle:0.7'
jar 'com.oracle:truffle-dsl-processor:0.7', :scope => 'provided'
@@ -24,12 +26,6 @@
'source' => [ '${base.java.version}', '1.7' ],
'target' => [ '${base.javac.version}', '1.7' ],
'useIncrementalCompilation' => 'false' ) do
execute_goals( 'compile',
:id => 'anno',
:phase => 'process-resources',
'includes' => [ 'org/jruby/truffle/om/dsl/processor/OMProcessor.java' ],
'compilerArgs' => [ '-XDignore.symbol.file=true',
'-J-ea' ] )
execute_goals( 'compile',
:id => 'default-compile',
:phase => 'compile',
@@ -67,7 +63,8 @@
:phase => 'verify',
:artifactSet => { :includes => [
'com.oracle:truffle',
'com.oracle:truffle-interop' ] },
'com.oracle:truffle-interop',
'org.jruby:jruby-truffle-om-dsl-api' ] },
:outputFile => '${project.build.directory}/jruby-truffle-${project.version}-complete.jar' )
end
end
32 changes: 16 additions & 16 deletions truffle/pom.xml
Original file line number Diff line number Diff line change
@@ -28,6 +28,18 @@ DO NOT MODIFIY - GENERATED CODE
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-truffle-om-dsl-processor</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-truffle-om-dsl-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>truffle</artifactId>
@@ -55,22 +67,6 @@ DO NOT MODIFIY - GENERATED CODE
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>anno</id>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<includes>
<include>org/jruby/truffle/om/dsl/processor/OMProcessor.java</include>
</includes>
<compilerArgs>
<compilerArg>-XDignore.symbol.file=true</compilerArg>
<compilerArg>-J-ea</compilerArg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>default-compile</id>
<phase>compile</phase>
@@ -141,6 +137,7 @@ DO NOT MODIFIY - GENERATED CODE
<includes>
<include>com.oracle:truffle</include>
<include>com.oracle:truffle-interop</include>
<include>org.jruby:jruby-truffle-om-dsl-api</include>
</includes>
</artifactSet>
<outputFile>${project.build.directory}/jruby-truffle-${project.version}-complete.jar</outputFile>
@@ -169,6 +166,7 @@ DO NOT MODIFIY - GENERATED CODE
<includes>
<include>com.oracle:truffle</include>
<include>com.oracle:truffle-interop</include>
<include>org.jruby:jruby-truffle-om-dsl-api</include>
</includes>
</artifactSet>
<outputFile>${project.build.directory}/jruby-truffle-${project.version}-complete.jar</outputFile>
@@ -197,6 +195,7 @@ DO NOT MODIFIY - GENERATED CODE
<includes>
<include>com.oracle:truffle</include>
<include>com.oracle:truffle-interop</include>
<include>org.jruby:jruby-truffle-om-dsl-api</include>
</includes>
</artifactSet>
<outputFile>${project.build.directory}/jruby-truffle-${project.version}-complete.jar</outputFile>
@@ -225,6 +224,7 @@ DO NOT MODIFIY - GENERATED CODE
<includes>
<include>com.oracle:truffle</include>
<include>com.oracle:truffle-interop</include>
<include>org.jruby:jruby-truffle-om-dsl-api</include>
</includes>
</artifactSet>
<outputFile>${project.build.directory}/jruby-truffle-${project.version}-complete.jar</outputFile>

0 comments on commit e06bdf6

Please sign in to comment.