Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-higgins committed Jan 28, 2024
2 parents 1ffa152 + 8b7ee28 commit 684d8ca
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion compiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Copyright (C) 2018 V12 Technology Ltd.
<parent>
<groupId>com.fluxtion</groupId>
<artifactId>root-parent-pom</artifactId>
<version>9.1.14-SNAPSHOT</version>
<version>9.1.15-SNAPSHOT</version>
<relativePath>../parent-root/pom.xml</relativePath>
</parent>

Expand Down
6 changes: 3 additions & 3 deletions compiler/src/main/java/com/fluxtion/compiler/Fluxtion.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ static EventProcessor compileAot(RootNodeConfig rootNode, String packagePrefix)
static EventProcessor compileFromReader(Reader reader) {
Yaml yaml = new Yaml();
DataDrivenGenerationConfig rootInjectedConfig = yaml.loadAs(reader, DataDrivenGenerationConfig.class);
if (rootInjectedConfig.getCompilerConfig().isCompileSource()) {
return EventProcessorFactory.compile(rootInjectedConfig.getEventProcessorConfig(), rootInjectedConfig.getCompilerConfig());
} else {
if (rootInjectedConfig.getCompilerConfig().isInterpreted()) {
return interpret(rootInjectedConfig.getRootNodeConfig());
} else {
return EventProcessorFactory.compile(rootInjectedConfig.getEventProcessorConfig(), rootInjectedConfig.getCompilerConfig());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package com.fluxtion.compiler;

import com.fluxtion.compiler.generation.OutputRegistry;
import lombok.Getter;
import lombok.Setter;

import java.io.StringWriter;
import java.io.Writer;
Expand Down Expand Up @@ -58,6 +60,12 @@ public class FluxtionCompilerConfig {
* Attempt to compile the generated source files
*/
private boolean compileSource;
/**
* Generate an interpreted version
*/
@Getter
@Setter
private boolean interpreted = false;
/**
* Attempt to format the generated source files
*/
Expand Down Expand Up @@ -226,6 +234,7 @@ public String toString() {
+ ", buildOutputdirectory=" + buildOutputDirectory
+ ", writeSourceToFile=" + writeSourceToFile
+ ", compileSource=" + compileSource
+ ", interpreted=" + interpreted
+ ", formatSource=" + formatSource
+ ", templateSep=" + templateSep
+ ", generateDescription=" + generateDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,8 @@ public static EventProcessor compile(
FluxtionCompilerConfig fluxtionCompilerConfig)
throws Exception {
EventProcessorCompilation compiler = new EventProcessorCompilation();
Class<EventProcessor> sepClass = compiler.compile(fluxtionCompilerConfig, eventProcessorConfig);
EventProcessor sep = sepClass.getDeclaredConstructor().newInstance();
return sep;
Class<EventProcessor<?>> sepClass = compiler.compile(fluxtionCompilerConfig, eventProcessorConfig);
return fluxtionCompilerConfig.isCompileSource() ? sepClass.getDeclaredConstructor().newInstance() : null;
}

private static class InProcessEventProcessorConfig extends EventProcessorConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public void interpretNoConfigFromStringTest() {
private static final String interpretString = "compilerConfig:\n" +
" className: MyProcessor\n" +
" packageName: com.mypackage\n" +
" compileSource: false\n" +
" formatSource: false\n" +
" interpreted: true\n" +
" generateDescription: false\n" +
" writeSourceToFile: false\n" +
"configMap:\n" +
Expand All @@ -78,7 +78,7 @@ public void interpretNoConfigFromStringTest() {
private static final String interpretNoConfigString = "compilerConfig:\n" +
" className: MyProcessor\n" +
" packageName: com.mypackage\n" +
" compileSource: false\n" +
" interpreted: true\n" +
" formatSource: false\n" +
" generateDescription: false\n" +
" writeSourceToFile: false\n" +
Expand Down
2 changes: 1 addition & 1 deletion parent-root/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.fluxtion</groupId>
<artifactId>root-parent-pom</artifactId>
<version>9.1.14-SNAPSHOT</version>
<version>9.1.15-SNAPSHOT</version>
<packaging>pom</packaging>
<name>fluxtion :: poms :: parent root</name>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ along with this program. If not, see
<modelVersion>4.0.0</modelVersion>
<groupId>com.fluxtion</groupId>
<artifactId>fluxtion.master</artifactId>
<version>9.1.14-SNAPSHOT</version>
<version>9.1.15-SNAPSHOT</version>
<packaging>pom</packaging>
<name>fluxtion</name>

Expand Down
2 changes: 1 addition & 1 deletion runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copyright (C) 2018 V12 Technology Ltd.
<parent>
<groupId>com.fluxtion</groupId>
<artifactId>root-parent-pom</artifactId>
<version>9.1.14-SNAPSHOT</version>
<version>9.1.15-SNAPSHOT</version>
<relativePath>../parent-root/pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit 684d8ca

Please sign in to comment.