You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2022/01/25 18:52:24 UTC
[royale-compiler] branch develop updated (8e67663 -> 4fc2532)
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.
from 8e67663 compiler-jx: minor refactor to call a function for each compilation unit instead of putting everything directly in the loop
new 707d100 MXMLJSC: validate targets compiler option
new 4fc2532 JSConfiguration: revert code that wasn't supposed to be committed yet
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../royale/compiler/clients/JSConfiguration.java | 33 ----------------------
.../apache/royale/compiler/clients/MXMLJSC.java | 19 ++++++++++++-
2 files changed, 18 insertions(+), 34 deletions(-)
[royale-compiler] 02/02: JSConfiguration: revert code that wasn't supposed to be committed yet
Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 4fc25321d6ffd3fa10a230319ab9c7001c1f2d7c
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Jan 25 10:50:33 2022 -0800
JSConfiguration: revert code that wasn't supposed to be committed yet
---
.../royale/compiler/clients/JSConfiguration.java | 33 ----------------------
1 file changed, 33 deletions(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
index 94f9e17..9778830 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/JSConfiguration.java
@@ -28,7 +28,6 @@ import java.util.Map;
import org.apache.royale.compiler.clients.MXMLJSC.JSTargetType;
import org.apache.royale.compiler.config.Configuration;
-import org.apache.royale.compiler.config.ConfigurationBuffer;
import org.apache.royale.compiler.config.ConfigurationValue;
import org.apache.royale.compiler.exceptions.ConfigurationException;
import org.apache.royale.compiler.exceptions.ConfigurationException.CannotOpen;
@@ -115,25 +114,6 @@ public class JSConfiguration extends Configuration
}
//
- // 'watch'
- //
-
- private boolean watch = false;
-
- public boolean getWatch()
- {
- return watch;
- }
-
- @Config
- @Mapping("watch")
- public void setWatch(ConfigurationValue cv, boolean value)
- throws ConfigurationException
- {
- watch = value;
- }
-
- //
// 'source-map'
//
@@ -652,17 +632,4 @@ public class JSConfiguration extends Configuration
{
jsxFactory = value;
}
-
- @Override
- public void validate(ConfigurationBuffer configurationBuffer) throws ConfigurationException
- {
- super.validate(configurationBuffer);
-
- if (getWatch() && !debug())
- {
- List<ConfigurationValue> values = configurationBuffer.getVar("watch");
- throw new ConfigurationException.VariableMissingRequirement("debug=true", values.get(0).getVar(), values.get(0).getSource(),
- values.get(0).getLine());
- }
- }
}
[royale-compiler] 01/02: MXMLJSC: validate targets compiler option
Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 707d100cb03b167a1e17922aae2cf209c6f82f53
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Jan 25 10:49:13 2022 -0800
MXMLJSC: validate targets compiler option
---
.../org/apache/royale/compiler/clients/MXMLJSC.java | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
index 33cfb43..9b3a2ec 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
@@ -174,7 +174,7 @@ public class MXMLJSC implements JSCompilerEntryPoint, ProblemQueryProvider,
if (text.equalsIgnoreCase(jsTargetType.text))
return jsTargetType;
}
- return JS_ROYALE;
+ return null;
}
}
@@ -928,6 +928,23 @@ public class MXMLJSC implements JSCompilerEntryPoint, ProblemQueryProvider,
return false;
}
+ for(String target : config.getCompilerTargets())
+ {
+ JSTargetType jsTargetType = JSTargetType.fromString(target);
+ if (jsTargetType == null)
+ {
+ String message = "configuration variable 'targets' must be one of the following: ";
+ for (JSTargetType type : JSTargetType.values())
+ {
+ message += "'" + type.text + "', ";
+ }
+ message += "got '" + target + "'";
+ final ICompilerProblem problem = new ConfigurationProblem(null, -1,
+ -1, -1, -1, message);
+ problems.add(problem);
+ }
+ }
+
if (problems.hasErrors())
return false;