Skip to content

Commit

Permalink
Merge branch 'main' into feat/error-recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterOlivier committed Jan 28, 2025
2 parents d93b87c + 27c2891 commit d196c03
Show file tree
Hide file tree
Showing 125 changed files with 15,004 additions and 13,588 deletions.
12 changes: 12 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# List of commits that shouldn't be included in `git blame`.
# Github and other tools already support it if it's this exact filename
# But you have to teach your own git about this by running this command (in this repo)
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# indent fix for JSON
31b1031ade5d84f9c60e30d17da3b55e78d291fb

# fixing tabs & spaces mixed
0d048e15683740b5c944be5333ec0680df825e47
23ec4b622bbe503ef013be5a458e45ae6fd89b97
200b0352084be9435c64aa60c550edd24a59131b
18 changes: 17 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: prepare-unshaded
if: startsWith(github.ref, 'refs/tags/')
run: sed -i 's#<artifactId>rascal</artifactId>#<artifactId>rascal-unshaded</artifactId>#' pom.xml

- name: Deploy unshaded jar
if: startsWith(github.ref, 'refs/tags/v')
uses: usethesource/releases-maven-action@v1
with:
maven-username: ${{ secrets.RELEASE_MAVEN_USERNAME }}
maven-password: ${{ secrets.RELEASE_MAVEN_PASSWORD }}
maven-local-port: ${{ secrets.RELEASE_MAVEN_LOCAL_PORT }}
ssh-hostname: ${{ secrets.RELEASE_SSH_SERVER }}
ssh-known-host: ${{ secrets.RELEASE_SSH_KNOWN_HOSTS }}
ssh-username: ${{ secrets.RELEASE_SSH_USERNAME }}
ssh-private-key: ${{ secrets.RELEASE_SSH_PRIVATE_KEY }}
maven-options: -Punshaded -Drascal.compile.skip -Drascal.tutor.skip -DskipTests

tests:
if: ${{ !(github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[maven-release-plugin]')) }}
Expand All @@ -134,7 +150,7 @@ jobs:

- name: Run Tests
# single quotes to help windows deal with argument splitting
run: mvn -B '-Drascal.compile.skip' '-Drascal.tutor.skip' '-Drascal.test.memory=3' test
run: mvn -B '-Drascal.compile.skip' '-Drascal.tutor.skip' '-Drascal.test.memory=2' test

- uses: codecov/codecov-action@v4
continue-on-error: true # sometimes this one fails, that shouldn't stop a build
Expand Down
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"request": "launch",
"mainClass": "org.rascalmpl.shell.RascalShell",
"projectName": "rascal",
"vmArgs": "-Xss80m -Xmx2g -ea"
"vmArgs": "-Xss80m -Xmx2g -ea",
"console": "integratedTerminal"
},
{
"type": "java",
Expand Down
120 changes: 84 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

<groupId>org.rascalmpl</groupId>
<artifactId>rascal</artifactId>
<version>0.40.18-SNAPSHOT</version>
<version>0.41.0-RC9-SNAPSHOT</version>
<packaging>jar</packaging>

<scm>
<developerConnection>scm:git:ssh://[email protected]/usethesource/rascal.git</developerConnection>
<tag>v0.40.16</tag>
<tag>v0.41.0-RC1</tag>
</scm>

<!-- dependency resolution configuration (usethesource) -->
Expand All @@ -29,11 +29,12 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lucence-version>7.5.0</lucence-version>
<maven-version>3.9.8</maven-version>
<maven-version>3.9.9</maven-version>
<exec.mainClass>org.rascalmpl.shell.RascalShell</exec.mainClass>
<rascal.test.memory>2</rascal.test.memory>
<rascal.test.memory>3</rascal.test.memory>
<maven.compiler.release>11</maven.compiler.release>
<rascal-maven.version>0.28.9-BOOT1</rascal-maven.version>
<jline.version>3.27.0</jline.version>
</properties>

<licenses>
Expand Down Expand Up @@ -104,7 +105,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
<executions>
<execution>
<phase>validate</phase>
Expand Down Expand Up @@ -214,7 +215,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.2</version>
<executions>
<execution>
<id>test</id>
Expand All @@ -236,6 +237,7 @@
<include>**/org/rascalmpl/test/AllSuiteParallel.java</include>
<include>**/org/rascalmpl/test/library/LibraryLangPaths.java</include>
<include>**/org/rascalmpl/test/value/AllTests.java</include>
<include>**/org/rascalmpl/test/repl/*Test.java</include>
<include>**/org/rascalmpl/*Test.java</include>
</includes>
</configuration>
Expand All @@ -262,7 +264,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.1</version>
<executions>
<execution>
<goals>
Expand All @@ -278,7 +280,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<arguments>-Drascal.compile.skip -Drascal.tutor.skip -DskipTests</arguments>
Expand All @@ -287,7 +289,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.4.0</version>
<version>2.5.0</version>
<executions>
<execution>
<id>download-licenses</id>
Expand Down Expand Up @@ -326,25 +328,12 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/sisu/javax.inject.Named</resource> <!-- Needed for dependency injection in MavenCli -->
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/> <!-- Needed for dependency injection in MavenCli -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" /> <!-- Needed for dependency injection in MavenCli -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
<addHeader>false</addHeader>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>org.fusesource.jansi</pattern>
<shadedPattern>org.rascalmpl.fusesource.jansi</shadedPattern>
<excludes>
<exclude>org.fusesource.jansi.internal.*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>jline</pattern>
<shadedPattern>org.rascalmpl.jline</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
Expand Down Expand Up @@ -435,7 +424,7 @@
<dependency>
<groupId>io.usethesource</groupId>
<artifactId>vallang</artifactId>
<version>1.0.0-RC12</version>
<version>1.0.0-RC15</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
Expand All @@ -455,32 +444,57 @@
<dependency> <!-- used by the compression uri feature-->
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.1</version>
<version>1.27.1</version>
</dependency>
<dependency> <!-- needed by commons-compress for compressed+...://...zst -->
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>1.5.5-11</version>
<version>1.5.6-8</version>
</dependency>
<dependency> <!-- used for base32 encoding in IO and String, needed anyway for commons-compress -->
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.17.0</version>
<version>1.17.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>2.14.6</version>
<dependency> <!-- line reader/completion/history support -->
<groupId>org.jline</groupId>
<artifactId>jline-reader</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency> <!-- terminal API -->
<groupId>org.jline</groupId>
<artifactId>jline-terminal</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency> <!-- interaction with native APIs for console features, after jdk22 we can switch to FFM -->
<groupId>org.jline</groupId>
<artifactId>jline-terminal-jni</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency> <!-- styling api -->
<groupId>org.jline</groupId>
<artifactId>jline-style</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency> <!-- command registyr and extra features -->
<groupId>org.jline</groupId>
<artifactId>jline-console</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency> <!-- raw ansi commands -->
<groupId>org.jline</groupId>
<artifactId>jansi-core</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
Expand Down Expand Up @@ -520,7 +534,7 @@
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>74.2</version>
<version>76.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -530,7 +544,7 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.1</version>
</dependency>
<dependency> <!-- needed for maven-embedder-->
<groupId>org.slf4j</groupId>
Expand All @@ -548,4 +562,38 @@
<version>${maven-version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>unshaded</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<skipDownloadLicenses>true</skipDownloadLicenses>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
</profile>
</profiles>
</project>
29 changes: 11 additions & 18 deletions src/org/rascalmpl/ast/Expression.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ public boolean hasArguments() {
public java.util.List<org.rascalmpl.ast.Expression> getArguments() {
throw new UnsupportedOperationException();
}
public boolean hasElements() {
return false;
}

public java.util.List<org.rascalmpl.ast.Expression> getElements() {
throw new UnsupportedOperationException();
}
public boolean hasElements0() {
return false;
}
Expand Down Expand Up @@ -6395,15 +6388,15 @@ public boolean isTuple() {
}

static public class Tuple extends Expression {
// Production: sig("Tuple",[arg("java.util.List\<org.rascalmpl.ast.Expression\>","elements")],breakable=false)
// Production: sig("Tuple",[arg("java.util.List\<org.rascalmpl.ast.Expression\>","elements0")],breakable=false)


private final java.util.List<org.rascalmpl.ast.Expression> elements;
private final java.util.List<org.rascalmpl.ast.Expression> elements0;

public Tuple(ISourceLocation src, IConstructor node , java.util.List<org.rascalmpl.ast.Expression> elements) {
public Tuple(ISourceLocation src, IConstructor node , java.util.List<org.rascalmpl.ast.Expression> elements0) {
super(src, node);

this.elements = elements;
this.elements0 = elements0;
}

@Override
Expand All @@ -6423,7 +6416,7 @@ protected void addForLineNumber(int $line, java.util.List<AbstractAST> $result)
}
ISourceLocation $l;

for (AbstractAST $elem : elements) {
for (AbstractAST $elem : elements0) {
$l = $elem.getLocation();
if ($l.hasLineColumn() && $l.getBeginLine() <= $line && $l.getEndLine() >= $line) {
$elem.addForLineNumber($line, $result);
Expand All @@ -6441,28 +6434,28 @@ public boolean equals(Object o) {
return false;
}
Tuple tmp = (Tuple) o;
return true && tmp.elements.equals(this.elements) ;
return true && tmp.elements0.equals(this.elements0) ;
}

@Override
public int hashCode() {
return 599 + 863 * elements.hashCode() ;
return 599 + 863 * elements0.hashCode() ;
}


@Override
public java.util.List<org.rascalmpl.ast.Expression> getElements() {
return this.elements;
public java.util.List<org.rascalmpl.ast.Expression> getElements0() {
return this.elements0;
}

@Override
public boolean hasElements() {
public boolean hasElements0() {
return true;
}

@Override
public Object clone() {
return newInstance(getClass(), src, (IConstructor) null , clone(elements));
return newInstance(getClass(), src, (IConstructor) null , clone(elements0));
}

}
Expand Down
Loading

0 comments on commit d196c03

Please sign in to comment.