import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext;
import org.simantics.scl.compiler.elaboration.expressions.Expression;
import org.simantics.scl.compiler.elaboration.macros.StandardMacroRule;
+import org.simantics.scl.compiler.elaboration.modules.DerivedProperty;
import org.simantics.scl.compiler.elaboration.modules.InlineProperty;
import org.simantics.scl.compiler.elaboration.modules.MethodImplementation;
import org.simantics.scl.compiler.elaboration.modules.PrivateProperty;
decomposed.typeParameters,
decomposed.returnType,
decomposed.parameterTypes));*/
+ boolean isDerived = false;
for(SCLValueProperty prop : value.getProperties()) {
if(prop instanceof InlineProperty) {
InlineProperty inlineProperty = (InlineProperty)prop;
constant.setInlineArity(inlineProperty.arity, inlineProperty.phaseMask);
}
else if(prop == PrivateProperty.INSTANCE)
- constant.setPrivate(true);
+ constant.setPrivate(!isDerived);
+ else if(prop == DerivedProperty.INSTANCE) {
+ constant.setPrivate(false);
+ isDerived = true;
+ }
}
}
// This is quite hackish optimization that can be possibly removed when
import org.simantics.scl.compiler.elaboration.java.JavaMethodDeclaration;
import org.simantics.scl.compiler.elaboration.macros.StandardMacroRule;
import org.simantics.scl.compiler.elaboration.modules.DeprecatedProperty;
+import org.simantics.scl.compiler.elaboration.modules.DerivedProperty;
import org.simantics.scl.compiler.elaboration.modules.InlineProperty;
import org.simantics.scl.compiler.elaboration.modules.MethodImplementation;
import org.simantics.scl.compiler.elaboration.modules.PrivateProperty;
String fullName = instancePrefix + valueName;
long loc = valueDefs.getDefinition(valueName).get(0).location;
valueDefinitionsAst.addFrom(valueDefs, valueName, fullName);
+ valueDefinitionsAst.setDerived(fullName);
/*valueDefinitionsAst.addAnnotation(fullName, new DAnnotationAst(new EVar("@private"),
Collections.<Expression>emptyList()));*/
TypeClassMethod method = typeClass.methods.get(valueName);
value.definitionLocation = location;
if(module.addValue(value))
errorLog.log(location, "Value " + name + " is already defined.");
+ if(valueDefinitionsAst.isDerived(name))
+ value.addProperty(DerivedProperty.INSTANCE);
}
for(DValueTypeAst valueTypeAst : typeAnnotationsAst)
for(EVar name : valueTypeAst.names) {
--- /dev/null
+package org.simantics.scl.compiler.elaboration.modules;
+
+public enum DerivedProperty implements SCLValueProperty {
+ INSTANCE;
+}
public final Name name;
public final boolean isDefault;
- private SCLValue value;
public MethodImplementation(Name name, boolean isDefault) {
this.name = name;
this.isDefault = isDefault;
}
-
- public SCLValue getValue() {
- return value;
- }
-
- public void setValue(SCLValue value) {
- this.value = value;
- }
-
}
import gnu.trove.impl.Constants;
import gnu.trove.map.hash.THashMap;
import gnu.trove.map.hash.TObjectLongHashMap;
+import gnu.trove.set.hash.THashSet;
public class ValueRepository {
THashMap<String, ArrayList<DValueAst>> values =
new THashMap<String, ArrayList<DValueAst>>();
THashMap<String, ArrayList<DAnnotationAst>> annotations =
new THashMap<String, ArrayList<DAnnotationAst>>();
+ THashSet<String> derived = new THashSet<String>();
TObjectLongHashMap<String> locations = new TObjectLongHashMap<String>(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR,
Locations.NO_LOCATION);
public long getLocation(String name) {
return locations.get(name);
}
+
+ public boolean isDerived(String name) {
+ return derived.contains(name);
+ }
+
+ public void setDerived(String name) {
+ derived.add(name);
+ }
}
else False
else True
+@inline
+filter :: (a -> <e> Boolean) -> T a -> <Proc,e> ()
+filter f it = loop ()
+ where
+ loop _ =
+ if hasNext it
+ then do
+ if f (next it)
+ then ()
+ else remove it
+ loop ()
+ else ()
+
@inline
mapFirst :: (a -> <e> Maybe b) -> T a -> <Proc,e> Maybe b
mapFirst f it = loop ()
all :: (a -> <e> Boolean) -> T a -> <e,Proc> Boolean
all f s = Iterator.iterB f (iterator s)
+
+filterInPlace :: (a -> <e> Boolean) -> T a -> <e,Proc> ()
+filterInPlace p s = Iterator.filter p (iterator s)
<feature
id="org.simantics.sdk"
label="Simantics SDK"
- version="1.29.0"
+ version="1.30.0"
provider-name="VTT Technical Research Centre of Finland">
<description url="http://www.example.com/description">
</code></pre>
</li>
<li>
-<p>Edit version number of `org.simantics.sdk` feature in `features/org.simantics.sdk.feature/feature.xml` to `x.y.z[.w]`.</p>
-<pre><code>
-<feature
+<p>Edit version number of <code>org.simantics.sdk</code> feature in <code>features/org.simantics.sdk.feature/feature.xml</code> to <code>x.y.z[.w]</code>.</p>
+<pre><code><feature
id="org.simantics.sdk"
label="Simantics SDK"
version="x.y.z"
provider-name="VTT Technical Research Centre of Finland">
</code></pre>
-<p>Now commit and push the changes to the release branch.</p>
+<p>An example of these changes can be seen in <a href="https://www.simantics.org:8088/r/gitweb?p=simantics/platform.git;a=commit;h=bab5c9bd68277c76dc5c20bc7a60a9896cbd1540">gitweb</a>.</p>
+</li>
+<li>
+<p>Ensure that Redmine has a release engineering issue for the branched release, such as <a href="https://www.simantics.org/redmine/issues/7263">Simantics 1.30.0 release engineering</a>. Make a copy of the previous release issue to create the new one. Include link to original issue while copying.</p>
+</li>
+<li>
+<p>Commit the changes made</p>
+<pre><code> git commit -a
+</code></pre>
+<p>with the commit message</p>
+<pre><code> Configured release/x.y.z[.w] branch for SDK builds.
+
+ refs #xxxx
+</code></pre>
+<p>where <code>#xxxx</code> is the number of the x.y.z[.w] release engineering issue and push them to remote</p>
+<pre><code> git push origin release/x.y.z[.w]
+</code></pre>
+</li>
+<li>
+<p>If you are branching from <code>master</code>, bump the revision of master right now to start the next release cycle in master.
+An example of these changes can be seen in <a href="https://www.simantics.org:8088/r/gitweb?p=simantics/platform.git;a=commitdiff;h=ae93c9930c6345c32219e6845b9e72e9d9d2d28c">gitweb</a>.</p>
+<p>Commit the changes with the following commit message</p>
+<pre><code>Bumped master target and org.simantics.sdk feature versions to x.y.z[.w].
+refs #yyyy
+</code></pre>
+<p>where <code>#yyyy</code> is the number of the next release's release engineering issue.</p>
</li>
</ol>
<h3>Initialize release branch distribution web site</h3>
at a later time for some reason, we'll put the documentation up then in a
separate Mediawiki installation.</p>
<ol>
-<li>Dump documentation wiki databases using [dump-wikis.sh](./dump-wikis.sh) script.</li>
+<li>Dump documentation wiki databases using <a href="./dump-wikis.sh">dump-wikis.sh</a> script.</li>
<li>Put the generated backup x.y.z.tar.gz at /var/backup/simantics-releases/x.y.z/wiki/</li>
</ol>
<h2>Compile change log entry</h2>
provider-name="VTT Technical Research Centre of Finland">
~~~
+ An example of these changes can be seen in [gitweb](https://www.simantics.org:8088/r/gitweb?p=simantics/platform.git;a=commit;h=bab5c9bd68277c76dc5c20bc7a60a9896cbd1540).
+
+4. Ensure that Redmine has a release engineering issue for the branched release, such as [Simantics 1.30.0 release engineering](https://www.simantics.org/redmine/issues/7263). Make a copy of the previous release issue to create the new one. Include link to original issue while copying.
+
+5. Commit the changes made
+
+ git commit -a
+
+ with the commit message
+
+ Configured release/x.y.z[.w] branch for SDK builds.
+
+ refs #xxxx
+
+ where `#xxxx` is the number of the x.y.z[.w] release engineering issue and push them to remote
+
+ git push origin release/x.y.z[.w]
+
+6. If you are branching from `master`, bump the revision of master right now to start the next release cycle in master.
+ An example of these changes can be seen in [gitweb](https://www.simantics.org:8088/r/gitweb?p=simantics/platform.git;a=commitdiff;h=ae93c9930c6345c32219e6845b9e72e9d9d2d28c).
+
+ Commit the changes with the following commit message
+
+ Bumped master target and org.simantics.sdk feature versions to x.y.z[.w].
+ refs #yyyy
+
+ where `#yyyy` is the number of the next release's release engineering issue.
+
### Initialize release branch distribution web site
* Run [SDK/Deploy External Components to Web](https://www.simantics.org/jenkins/job/SDK/job/Deploy%20External%20Components%20to%20Web/) build with parameters:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
-<target name="Simantics 1.29.0" sequenceNumber="21">
+<target name="Simantics 1.30.0" sequenceNumber="22">
<locations>
<location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
-<unit id="org.simantics.sdk.feature.group" version="1.29.0"/>
-<unit id="org.simantics.sdk.source.feature.group" version="1.29.0"/>
+<unit id="org.simantics.sdk.feature.group" version="1.30.0"/>
+<unit id="org.simantics.sdk.source.feature.group" version="1.30.0"/>
<repository location="http://www.simantics.org/download/master/sdk"/>
</location>
<location includeAllPlatforms="true" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>org.simantics.sdk.repository</artifactId>
- <version>1.29.0-SNAPSHOT</version>
+ <version>1.30.0-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<parent>
@Test public void LocalDefinitions4() { test(); }
@Test public void LocalDefinitions5() { test(); }
@Test public void Logger() { test(); }
+ @Test public void LP() { test(); }
@Test public void Macros1() { test(); }
@Test public void Macros2() { test(); }
@Test public void Macros4() { test(); }
@Test public void SinConst1() { test(); }
@Test public void Sort() { test(); }
@Test public void Sort2() { test(); }
+ @Test public void SpecConstr1() { test(); }
@Test public void SSATypingBug() { test(); }
@Test public void StreamFusion() { test(); }
@Test public void StringEscape() { test(); }
@Test public void FunctionalDependencies2() { test(); }
@Test public void InlineLoop() { test(); }
@Test public void InstanceTypeVariables() { test(); }
- @Test public void LP() { test(); }
@Test public void Macros3() { test(); }
@Test public void MissingTypeParameter() { test(); }
@Test(timeout=100L) public void RecursiveValues() { test(); }
@Test public void Set1() { test(); }
@Test public void Signals() { test(); }
- @Test public void SpecConstr1() { test(); }
@Test public void StackTrace() { test(); }
- @Test public void StringInterpolation2() { test(); }
@Test public void Timing() { test(); }
}