Skip to content

Commit

Permalink
Update reactor-c submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed May 26, 2023
2 parents bf4ac76 + 27f7d55 commit aad2ef3
Show file tree
Hide file tree
Showing 21 changed files with 218 additions and 111 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test the automatic code formatting task
name: Spotless check

on:
workflow_call:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ jobs:
uses: lf-lang/lingua-franca/.github/workflows/build-trace-tools.yml@master
needs: cancel

# Check that automatic code formatting works.
# TODO: Uncomment after fed-gen is merged.
# format:
# uses: lf-lang/lingua-franca/.github/workflows/format.yml@master
# needs: cancel
check-format:
uses: lf-lang/lingua-franca/.github/workflows/check-format.yml@master
needs: cancel

# Run the unit tests.
unit-tests:
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "org.lflang/src/lib/c/reactor-c"]
path = org.lflang/src/lib/c/reactor-c
url = https://github.com/lf-lang/reactor-c.git
[submodule "org.lflang/src/lib/py/lf-python-support"]
path = org.lflang/src/lib/py/lf-python-support
url = https://github.com/lf-lang/lf-python-support.git
[submodule "org.lflang/src/lib/cpp/reactor-cpp"]
path = org.lflang/src/lib/cpp/reactor-cpp
url = https://github.com/lf-lang/reactor-cpp
[submodule "org.lflang/src/lib/rs/reactor-rs"]
path = org.lflang/src/lib/rs/reactor-rs
url = https://github.com/lf-lang/reactor-rs
[submodule "org.lflang/src/lib/py/lf-python-support"]
path = org.lflang/src/lib/py/lf-python-support
url = https://github.com/lf-lang/lf-python-support.git
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changelog

## [v0.4.0](https://github.com/lf-lang/lingua-franca/tree/v0.4.0) (2023-03-01)

**Highlights**
Expand Down Expand Up @@ -207,7 +207,7 @@ This release includes substantial changes under the hood and brings a lot of new
- Fix problem with merging of reaction plans [\#28](https://github.com/lf-lang/reactor-rs/pull/28) ([oowekyala](https://github.com/oowekyala))



## [v0.3.0](https://github.com/lf-lang/lingua-franca/tree/v0.3.0) (2022-07-22)

**Highlights**
Expand Down Expand Up @@ -309,7 +309,7 @@ This release adds broader support for methods (C and Python), syntax for annotat
- Increased coverage of unit tests in bank.ts, multiport.ts and port.ts [\#100](https://github.com/lf-lang/reactor-ts/pull/100) ([goekberk](https://github.com/goekberk))



## [v0.2.1](https://github.com/lf-lang/lingua-franca/tree/v0.2.1) (2022-06-01)

**Highlights:**
Expand Down Expand Up @@ -373,7 +373,7 @@ This release includes bug fixes related to IDE tooling and federated execution.
- Do not create the temporary dependency link if a connection between f… [\#1085](https://github.com/lf-lang/lingua-franca/pull/1085) ([edwardalee](https://github.com/edwardalee))
- Replace Value with Expression in the grammar [\#1023](https://github.com/lf-lang/lingua-franca/pull/1023) ([cmnrd](https://github.com/cmnrd))
- Scale back LSP tests [\#944](https://github.com/lf-lang/lingua-franca/pull/944) ([petervdonovan](https://github.com/petervdonovan))

## [v0.2.0](https://github.com/lf-lang/lingua-franca/tree/v0.2.0) (2022-05-01)

**Highlights:**
Expand Down Expand Up @@ -415,7 +415,7 @@ This release brings the minimum version requirement of Java to 17, which is a lo
- Java configuration bumped to version 17 [\#1094](https://github.com/lf-lang/lingua-franca/pull/1094) ([lhstrh](https://github.com/lhstrh))
- Add validation tests for ports in main or federated reactor [\#1091](https://github.com/lf-lang/lingua-franca/pull/1091) ([housengw](https://github.com/housengw))
- Update and add federated execution tests for TypeScript target [\#1062](https://github.com/lf-lang/lingua-franca/pull/1062) ([hokeun](https://github.com/hokeun))

## [v0.1.0](https://github.com/lf-lang/lingua-franca/tree/v0.1.0) (2022-04-11)

**Highlights:**
Expand Down Expand Up @@ -631,7 +631,7 @@ The `lfc` command line application is suitable for:
#### System Requirements
- Java 11 or up ([download from Oracle](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html))
- Various target-specific dependencies, documented [here](https://github.com/icyphy/lingua-franca/blob/7473ae1549c2b2aeed8f5469675f328d3984cb2c/REQUIREMENTS.md)

#### IDE Features
- code generation
- diagram synthesis
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can work on the Lingua Franca code base in your favorite editor and build us
Please refer to our handbook for specific instructions for setting up a development environment in [IntelliJ](https://www.lf-lang.org/docs/handbook/intellij) or [Eclipse](https://www.lf-lang.org/docs/handbook/eclipse-oomph).

### Writing tests
An integral part of contributing code is writing tests.
An integral part of contributing code is writing tests.

**Unit tests** for the compiler are located in the `org.lflang.tests` package and are implemented using the JUnit test framework. These tests are invoked using Gradle. For example, to run all the tests in the `org.lflang.tests.compiler` package, use the following command:
```
Expand Down Expand Up @@ -137,9 +137,9 @@ In Java, instances of collection classes may be read-only. They will throw an ex

```
/* Assume the returned list is unmodifiable */
List<String> contents = container.getListOfContents();
List<String> contents = container.getListOfContents();
/* You can iterate on the list, get an item, but not set/add/remove. To make local modifications, make a copy:*/
contents = new ArrayList<>(contents);
contents = new ArrayList<>(contents);
/* Now the list is modifiable, but changes do not affect the `container` object */
contents.add("extra");
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ Lingua Franca (LF) is a polyglot coordination language for concurrent and possib
See [lf-lang.org](https://lf-lang.org) for installation instructions and documentation. See also the [wiki](https://github.com/icyphy/lingua-franca/wiki) for further information on ongoing projects.

See our [Publications and Presentations](https://www.lf-lang.org/publications-and-presentations).


4 changes: 2 additions & 2 deletions REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ With Java (>= 11), you should also be able to use the provided Eclipse IDE produ

However, to compile the generated code and to create a binary (which is done by default), each target language in Lingua Franca has an additional set of requirements, which are listed in this section. We also include a list of tested operating systems in the format of a compact table below.

**Note:** Compiling the generated code is generally automatically done in the Eclipse IDE or while using the `lfc` command line tool. This default behavior can be disabled, however, using the [no-compile](https://github.com/icyphy/lingua-franca/wiki/target-specification#no-compile) target property in your Lingua Franca program or by using the `-n` argument for the `lfc` command line tool (see [Command Line Tools](https://github.com/icyphy/lingua-franca/wiki/Command-Line-Tools)).
**Note:** Compiling the generated code is generally automatically done in the Eclipse IDE or while using the `lfc` command line tool. This default behavior can be disabled, however, using the [no-compile](https://github.com/icyphy/lingua-franca/wiki/target-specification#no-compile) target property in your Lingua Franca program or by using the `-n` argument for the `lfc` command line tool (see [Command Line Tools](https://github.com/icyphy/lingua-franca/wiki/Command-Line-Tools)).


### Supported Operating Systems
Expand All @@ -34,7 +34,7 @@ However, to compile the generated code and to create a binary (which is done by
### Dependencies

**C:**
- A C compiler (e.g., gcc >= 7, clang, or MSVC >= 14.20)
- A C compiler (e.g., gcc >= 7, clang, or MSVC >= 14.20)
- CMAKE >= 3.13 (follow https://cmake.org/install/ for installation instructions)
- **Windows Only:** Visual Studio >= 2019 and Windows SDK >= 10.0.18362.0
- **Programs using Protocol Buffers:** protoc-c 1.3.3 - see https://github.com/icyphy/lingua-franca/wiki/Protobufs.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ subprojects {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

configurations.all {
configurations.configureEach {
exclude group: 'asm'
}

Expand Down Expand Up @@ -115,4 +115,4 @@ spotless {
formatAnnotations()
}
}
tasks.withType(SpotlessTask) { it.dependsOn(":org.lflang:jarCliTools") }
tasks.withType(SpotlessTask).configureEach { it.dependsOn(":org.lflang:jarCliTools") }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.fail;

import java.nio.file.Files;
import java.nio.file.Path;
import org.eclipse.xtext.testing.InjectWith;
import org.eclipse.xtext.testing.extensions.InjectionExtension;
Expand Down Expand Up @@ -58,10 +57,5 @@ private void run(Path file) throws Exception {
"The reformatted version of %s was not equivalent to the original file.%n"
+ "Formatted file:%n%s%n%n",
file, squishedTestCase));
final String normalTestCase = FormattingUtils.render(originalModel);
Assertions.assertEquals(
Files.readString(file).replaceAll("\\r\\n?", "\n"),
normalTestCase,
"File is not formatted properly, or formatter is bugged. Check " + file);
}
}
116 changes: 58 additions & 58 deletions org.lflang/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies {
mwe2 "org.eclipse.xtext:org.eclipse.xtext.xtext.generator:${xtextVersion}"
}

task generateXtextLanguage(type: JavaExec) {
tasks.register('generateXtextLanguage', JavaExec) {
main = 'org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher'
classpath = configurations.mwe2
inputs.file "src/org/lflang/GenerateLinguaFranca.mwe2"
Expand Down Expand Up @@ -90,10 +90,10 @@ configurations {
}
}

task getSubmoduleVersions(type: Exec) {
tasks.register('getSubmoduleVersions', Exec) {
description('Run a Git command to get the current status of submodules')
workingDir project.rootDir
// This will make gradle execute git submodule status every time updateRustRuntime is called
// This will make gradle execute git submodule status every time updateRustRuntime is called
outputs.upToDateWhen { false }

def command = "git submodule status"
Expand All @@ -119,7 +119,7 @@ task getSubmoduleVersions(type: Exec) {
}
}

task updateRustRuntime {
tasks.register('updateRustRuntime') {
description('Record the VCS revisions of the language runtimes into a properties file available at runtime.')

dependsOn getSubmoduleVersions
Expand All @@ -138,7 +138,7 @@ task updateRustRuntime {
sourceSets.main.output.dir tasks.updateRustRuntime.outputFile, builtBy: updateRustRuntime
tasks.processResources.dependsOn(updateRustRuntime)

task checkRuntimeVersionFileUpToDate {
tasks.register('checkRuntimeVersionFileUpToDate') {
description('Check that the runtime version recorded in the built Jar for LFC matches the version of the checked out submodule')
dependsOn getSubmoduleVersions
inputs.file updateRustRuntime.outputFile
Expand Down Expand Up @@ -168,13 +168,13 @@ task checkRuntimeVersionFileUpToDate {
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'

task buildAll() {
tasks.register('buildAll') {
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
mainClassName = 'org.lflang.cli.Lfc'
}

task jarCliTools(type: ShadowJar) {
tasks.register('jarCliTools', ShadowJar) {
manifest {
attributes('Main-Class': 'org.lflang.cli.Lfc')
}
Expand All @@ -186,7 +186,7 @@ task jarCliTools(type: ShadowJar) {
// the classes manually, minimize does not see the dependency. While we can add an exclude
// rule, this does not seem to work very well and causes problems when compiling for a
// second time. Also see https://github.com/lf-lang/lingua-franca/pull/1285
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer){
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
resource = 'plugin.properties'
}
from sourceSets.main.output
Expand All @@ -200,7 +200,7 @@ buildAll.finalizedBy jarCliTools
// to escape cli flags which start with --.For instance --args ' --help'.
// Otherwise they're parsed as arguments to the Gradle CLI, not lfc.

task runLfc(type: JavaExec) {
tasks.register('runLfc', JavaExec) {
// builds and runs lfc
description = "Build and run lfc, use --args to pass arguments"
group = "application"
Expand All @@ -209,7 +209,7 @@ task runLfc(type: JavaExec) {
workingDir = '..'
}

task runLff(type: JavaExec) {
tasks.register('runLff', JavaExec) {
// builds and runs lff
description = "Build and run lff, use --args to pass arguments"
group = "application"
Expand All @@ -218,75 +218,75 @@ task runLff(type: JavaExec) {
workingDir = '..'
}

task generateLanguageDiagramServer {
description 'Creates a jar that implements a language server with diagram support for LF.'
tasks.register('generateLanguageDiagramServer') {
description 'Creates a jar that implements a language server with diagram support for LF.'

apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'

mainClassName = "org.lflang.diagram.lsp.LanguageDiagramServer"

compileJava {
options.compilerArgs << '-Xlint:unchecked'
}

shadowJar {
archiveClassifier = 'lds'

// Handling of service loader registrations via META-INF/services/*
mergeServiceFiles()

// Merge properties
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer){
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
resource = 'plugin.properties'
}

// Exclude files that are known to be dispensable for a language server
exclude(
'*._trace',
'*.ecore',
'*.ecorediag',
'*.g',
'*.genmodel',
'*.html',
'*.mwe2',
'*.profile',
'*.xtext',
'*readme.txt',
'.api_description',
'.options',
'about.*',
'about_*',
'about_files/*',
'ant_tasks/*',
'cheatsheets/*',
'com/*/*.java',
'de/*/*.java',
'docs/*',
'log4j.properties',
'META-INF/*.DSA',
'META-INF/*.RSA',
'META-INF/*.SF',
'META-INF/changelog.txt',
'META-INF/DEPENDENCIES',
'META-INF/eclipse.inf',
'META-INF/INDEX.LIST',
'META-INF/maven/*',
'META-INF/NOTICE',
'META-INF/NOTICE.txt',
'META-INF/p2.inf',
'META-INF/versions/*/module-info.class',
'modeling32.png',
'module-info.class',
'org/*/*.java',
'OSGI-INF/l10n/bundle.properties',
'plugin.xml',
'profile.list',
'schema/*',
'systembundle.properties',
'xtend-gen/*',
'xtext32.png',
'*._trace',
'*.ecore',
'*.ecorediag',
'*.g',
'*.genmodel',
'*.html',
'*.mwe2',
'*.profile',
'*.xtext',
'*readme.txt',
'.api_description',
'.options',
'about.*',
'about_*',
'about_files/*',
'ant_tasks/*',
'cheatsheets/*',
'com/*/*.java',
'de/*/*.java',
'docs/*',
'log4j.properties',
'META-INF/*.DSA',
'META-INF/*.RSA',
'META-INF/*.SF',
'META-INF/changelog.txt',
'META-INF/DEPENDENCIES',
'META-INF/eclipse.inf',
'META-INF/INDEX.LIST',
'META-INF/maven/*',
'META-INF/NOTICE',
'META-INF/NOTICE.txt',
'META-INF/p2.inf',
'META-INF/versions/*/module-info.class',
'modeling32.png',
'module-info.class',
'org/*/*.java',
'OSGI-INF/l10n/bundle.properties',
'plugin.xml',
'profile.list',
'schema/*',
'systembundle.properties',
'xtend-gen/*',
'xtext32.png',
)

// Minimizing should be enabled with caution because some classes are only
Expand Down
2 changes: 1 addition & 1 deletion org.lflang/src/lib/py/lf-python-support
Submodule lf-python-support updated 1 files
+1 −1 setup.py
Loading

0 comments on commit aad2ef3

Please sign in to comment.