Skip to content

Commit

Permalink
Merge pull request #79 from mbeddr/feature/migrate_to_2023.2
Browse files Browse the repository at this point in the history
Upgrade to MPS 2023.2
  • Loading branch information
danielratiu authored Jan 30, 2024
2 parents 3839047 + 52ee2d5 commit 51684d7
Show file tree
Hide file tree
Showing 894 changed files with 4,049 additions and 4,086 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: FASTEN_CI
on: [push, pull_request]

env:
MPS_VER: "2022.3"
MPS_VER: "2023.2"
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.FASTEN_GITHUB_PKG_REGISTRY }}

Expand Down Expand Up @@ -104,8 +104,8 @@ jobs:
- name: Archive distribution
uses: actions/upload-artifact@v2
with:
name: fasten-distribution-win-2022.3-${{ steps.time.outputs.time }}
path: build/distributions/fasten-2022.3-SNAPSHOT-Win-2022.3-SNAPSHOT.zip
name: fasten-distribution-win-2023.2-${{ steps.time.outputs.time }}
path: build/distributions/fasten-2023.2-SNAPSHOT-Win-2023.2-SNAPSHOT.zip


build_fasten_assurance_package:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and build the languages.
* copy the *gradle.properties.example* as *gradle.properties* and replace "<...>" with your paths, github-username and a token with rights to access github-packages
- in *Windows* please note that the paths should use *slash* instead of *back-slash*, and they must NOT contain any *space* character (' ') - e.g.
```properties
mpsHomeDir=C:/work/MPS_2022.3.x
mpsHomeDir=C:/work/MPS_2023.2
mbeddr.formal.home=C:/work/mbeddr.formal
gpr.user=<a github user name>
gpr.token=<token for package access>
Expand All @@ -31,7 +31,7 @@ and build the languages.

## Building (from MPS)

1. [download](https://www.jetbrains.com/mps/download/previous.html) and install MPS 2022.3.x
1. [download](https://www.jetbrains.com/mps/download/previous.html) and install MPS 2023.2
2. run `gradlew.bat setup`. You can skip this step if you have built the project with Gradle already.
3. start MPS
4. in 'Settings->Appearance & Behavior->Path Variables', set the path variable `mbeddr.formal.home` to point to the directory which contains the cloned 'mbeddr.formal' repository.
Expand Down
49 changes: 36 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ plugins {
id("co.riiid.gradle") version "0.4.2"

// Version must match buildscript mps-gradle-plugin dependency above
id("download-jbr") version "1.17.+"
id("de.itemis.mps.gradle.common") version "1.20.+"
id("download-jbr") version "1.22.+"
id("de.itemis.mps.gradle.common") version "1.22.+"
}

val jbrVers = "17.0.6-b653.34"
val jbrVers = "17.0.8.1-b1000.32"

downloadJbr {
jbrVersion = jbrVers
Expand All @@ -35,9 +35,9 @@ if (nexusUsername == null) {
logger.info("Repository username: {}", nexusUsername)

// Project versions
val major = "2022"
val minor = "3"
val bugfix = "1"
val major = "2023"
val minor = "2"
val bugfix = ""

fun appendOpt(str:String, pre:String) = if(!str.isEmpty()) "${pre}${str}" else ""

Expand Down Expand Up @@ -150,6 +150,8 @@ val defaultScriptArgs = mapOf(
"jdk.util.zip.disableZip64ExtraFieldValidation" to true
)

fun scriptFile(relativePath: String):File = File("$rootDir/build/scripts/patched/$relativePath")

tasks {
val configureJava by registering {
val downloadJbr = named("downloadJbr", DownloadJbrForPlatform::class)
Expand Down Expand Up @@ -180,24 +182,45 @@ tasks {
description = "Set up MPS project libraries. Libraries are read in from projectlibraries.properties file."
}

val build_allScripts by registering(BuildLanguages::class) {
val build_allScripts_unpatched by registering(BuildLanguages::class) {
dependsOn(resolveMps, resolveLanguageLibs)
script = "$buildDir/scripts/build_all_scripts.xml"
}

// Patch JNA path in generated build scripts until https://github.com/JetBrains/MPS/pull/71 is fixed
val patch_allScripts by registering(Copy::class) {
dependsOn(build_allScripts_unpatched)
from("build/scripts")
exclude("patched")
exclude("build")
into("build/scripts/patched")

val isAarch64 = System.getProperty("os.arch") == "aarch64"
val jnaArch = if (isAarch64) "aarch64" else "amd64"

filter { line: String ->
line.replace("\"-Djna.boot.library.path=${'$'}{artifacts.mps}/lib/jna\"",
"\"-Djna.boot.library.path=${'$'}{artifacts.mps}/lib/jna/" + jnaArch + "\"")
}
}

val build_allScripts by registering {
dependsOn(patch_allScripts, resolveLanguageLibs)
}

val build_formal_languages by registering(BuildLanguages::class) {
dependsOn(build_allScripts)
script = "$buildDir/scripts/build-formal-languages.xml"
script = scriptFile("build-formal-languages.xml")
}

val build_fasten_safety_distribution by registering(BuildLanguages::class) {
dependsOn(build_formal_languages)
script = "$buildDir/scripts/build-fasten-safe-distribution.xml"
script = scriptFile("build-fasten-safe-distribution.xml")
}

val run_smv_tests by registering(TestLanguages::class) {
description = "Will execute all tests from command line"
script = "$buildDir/scripts/build-nusmv-tests.xml"
script = scriptFile("build-nusmv-tests.xml")
doLast {
ant.withGroovyBuilder {
"taskdef"("name" to "junitreport",
Expand All @@ -214,7 +237,7 @@ tasks {

val run_safety_tests by registering(TestLanguages::class) {
description = "Will execute all tests from command line"
script = "$buildDir/scripts/build-safety-tests.xml"
script = scriptFile("build-safety-tests.xml")
doLast {
ant.withGroovyBuilder {
"taskdef"("name" to "junitreport",
Expand All @@ -232,7 +255,7 @@ tasks {
val run_all_tests by registering(TestLanguages::class) {
dependsOn(configureJava)
description = "Will execute all tests from command line"
script = "$buildDir/scripts/build-all-tests.xml"
script = scriptFile("build-all-tests.xml")
doLast {
ant.withGroovyBuilder {
"taskdef"("name" to "junitreport",
Expand Down Expand Up @@ -260,7 +283,7 @@ tasks {

val build_assurance_languages by registering(BuildLanguages::class) {
dependsOn(build_allScripts)
script = "$buildDir/scripts/build-assurance-languages.xml"
script = scriptFile("build-assurance-languages.xml")
}

val package_assurance by registering(Zip::class) {
Expand Down
7 changes: 3 additions & 4 deletions build/scripts/build_all_scripts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<path id="path.mps.ant.path">
<pathelement location="${artifacts.mps}/lib/ant/lib/ant-mps.jar" />
<fileset dir="${artifacts.mps}/lib">
<include name="util.jar" />
<include name="util-8.jar" />
</fileset>
</path>

Expand Down Expand Up @@ -92,7 +92,6 @@
<echoxml file="${build.tmp}/default/com.fasten.assurance.build.jar/META-INF/module.xml">
<module namespace="com.fasten.assurance.build" type="solution" uuid="7301161d-854c-45d9-b0d7-121b4fb52625">
<dependencies>
<module ref="b4bbc0a5-248e-4db2-9ddc-4901a463c66c(com.mbeddr.formal.safety.build)" kind="cl" />
<module ref="3ae9cfda-f938-4524-b4ca-fbcba3b0525b(com.mbeddr.platform)" kind="cl" />
<module ref="f1fb7b1c-ce0d-423c-9369-4a661d600029(de.itemis.mps.extensions.build)" kind="cl" />
<module ref="422c2909-59d6-41a9-b318-40e6256b250f(jetbrains.mps.ide.build)" kind="cl" />
Expand Down Expand Up @@ -229,6 +228,7 @@
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.dataFlow.runtime.jar" />
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.findUsages.runtime.jar" />
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.lang.behavior.api.jar" />
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.lang.constraints.rules.runtime.jar" />
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.lang.feedback.context.jar" />
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.lang.feedback.problem.legacy-constraints.jar" />
<library file="${artifacts.mps}/languages/runtimes/jetbrains.mps.lang.feedback.problem.rt.jar" />
Expand Down Expand Up @@ -282,7 +282,7 @@
</javac>
</target>

<target name="java.compile.com.fasten.assurance.build" depends="java.compile.com.mbeddr.formal.safety.build">
<target name="java.compile.com.fasten.assurance.build">
<mkdir dir="${mbeddr.formal.safety.code}/solutions/com.fasten.assurance.build/source_gen" />
<mkdir dir="${build.tmp}/java/out/com.fasten.assurance.build" />
<javac destdir="${build.tmp}/java/out/com.fasten.assurance.build" fork="true" encoding="utf8" includeantruntime="false" debug="true">
Expand All @@ -291,7 +291,6 @@
<path location="${mbeddr.formal.safety.code}/solutions/com.fasten.assurance.build/source_gen" />
</src>
<classpath>
<pathelement path="${build.tmp}/java/out/com.mbeddr.formal.safety.build" />
<fileset file="${artifacts.com.mbeddr.platform}/com.mbeddr.platform.jar" />
<fileset file="${artifacts.com.mbeddr.platform}/de.itemis.mps.extensions.build/languages/de.itemis.mps.extensions.build/de.itemis.mps.extensions.build.jar" />
</classpath>
Expand Down
4 changes: 3 additions & 1 deletion code/languages/com.fasten.symo/.mps/migration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<entry key="jetbrains.mps.ide.mpsmigration.v_2021_3.ExtractMPSBootStubs" value="executed" />
<entry key="jetbrains.mps.ide.mpsmigration.v_2022_3.ExplicitJavaFacetSettings" value="executed" />
<entry key="jetbrains.mps.ide.mpsmigration.v_2022_3.SplitMPSCoreStub2" value="executed" />
<entry key="project.migrated.version" value="223" />
<entry key="jetbrains.mps.ide.mpsmigration.v_2023_1.DataFlowStubsToRegularNodes" value="executed" />
<entry key="jetbrains.mps.ide.mpsmigration.v_2023_1.JavaModuleSettingsToFacet" value="executed" />
<entry key="project.migrated.version" value="232" />
</component>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</facet>
</facets>
<accessoryModels />
<sourcePath />
<dependencies>
<dependency reexport="false">83ed2dfe-f724-46cc-852a-dce086daee3f(com.mbeddr.formal.base)</dependency>
<dependency reexport="true">1144260c-e9a5-49a2-9add-39a1a1a7077e(de.itemis.mps.editor.diagram.runtime)</dependency>
Expand All @@ -21,7 +20,7 @@
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
<language slang="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" version="0" />
<language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="1" />
<language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="2" />
<language slang="l:f2801650-65d5-424e-bb1b-463a8781b786:jetbrains.mps.baseLanguage.javadoc" version="2" />
<language slang="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" version="0" />
<language slang="l:a247e09e-2435-45ba-b8d2-07e93feba96a:jetbrains.mps.baseLanguage.tuples" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<concept id="1188207840427" name="jetbrains.mps.baseLanguage.structure.AnnotationInstance" flags="nn" index="2AHcQZ">
<reference id="1188208074048" name="annotation" index="2AI5Lk" />
</concept>
<concept id="1188208481402" name="jetbrains.mps.baseLanguage.structure.HasAnnotation" flags="ng" index="2AJDlI">
<concept id="1188208481402" name="jetbrains.mps.baseLanguage.structure.HasAnnotation" flags="ngI" index="2AJDlI">
<child id="1188208488637" name="annotation" index="2AJF6D" />
</concept>
<concept id="1197027756228" name="jetbrains.mps.baseLanguage.structure.DotExpression" flags="nn" index="2OqwBi">
Expand Down Expand Up @@ -94,7 +94,7 @@
</concept>
<concept id="1068581242863" name="jetbrains.mps.baseLanguage.structure.LocalVariableDeclaration" flags="nr" index="3cpWsn" />
<concept id="1068581517677" name="jetbrains.mps.baseLanguage.structure.VoidType" flags="in" index="3cqZAl" />
<concept id="1204053956946" name="jetbrains.mps.baseLanguage.structure.IMethodCall" flags="ng" index="1ndlxa">
<concept id="1204053956946" name="jetbrains.mps.baseLanguage.structure.IMethodCall" flags="ngI" index="1ndlxa">
<reference id="1068499141037" name="baseMethodDeclaration" index="37wK5l" />
<child id="1068499141038" name="actualArgument" index="37wK5m" />
</concept>
Expand All @@ -105,7 +105,7 @@
<concept id="1107535904670" name="jetbrains.mps.baseLanguage.structure.ClassifierType" flags="in" index="3uibUv">
<reference id="1107535924139" name="classifier" index="3uigEE" />
</concept>
<concept id="1178549954367" name="jetbrains.mps.baseLanguage.structure.IVisible" flags="ng" index="1B3ioH">
<concept id="1178549954367" name="jetbrains.mps.baseLanguage.structure.IVisible" flags="ngI" index="1B3ioH">
<child id="1178549979242" name="visibility" index="1B3o_S" />
</concept>
<concept id="1146644602865" name="jetbrains.mps.baseLanguage.structure.PublicVisibility" flags="nn" index="3Tm1VV" />
Expand Down Expand Up @@ -134,11 +134,11 @@
<child id="8637411062076630380" name="connectionTypes" index="1xLlFP" />
<child id="1981294357059564524" name="paletteSources" index="1RuSHk" />
</concept>
<concept id="9064581101900867235" name="de.itemis.mps.editor.diagram.structure.IEdgeEditor" flags="ng" index="ljJFv">
<concept id="9064581101900867235" name="de.itemis.mps.editor.diagram.structure.IEdgeEditor" flags="ngI" index="ljJFv">
<child id="8587703283523592228" name="endpointFrom" index="1PN8q7" />
<child id="8587703283523592242" name="endpointTo" index="1PN8qh" />
</concept>
<concept id="5383048119156619323" name="de.itemis.mps.editor.diagram.structure.IDiagramElementsProvider" flags="ng" index="HB_m5">
<concept id="5383048119156619323" name="de.itemis.mps.editor.diagram.structure.IDiagramElementsProvider" flags="ngI" index="HB_m5">
<child id="3155126767688717334" name="contentList" index="aCds2" />
</concept>
<concept id="6237710625713195816" name="de.itemis.mps.editor.diagram.structure.CellModel_DiagramNode" flags="ng" index="2ZK4vF">
Expand Down Expand Up @@ -187,7 +187,7 @@
</concept>
</language>
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ngI" index="TrEIO">
<property id="1169194664001" name="name" index="TrG5h" />
</concept>
</language>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</concept>
</language>
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ngI" index="TrEIO">
<property id="1169194664001" name="name" index="TrG5h" />
</concept>
</language>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</facet>
</facets>
<accessoryModels />
<sourcePath />
<dependencies>
<dependency reexport="false">2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)</dependency>
<dependency reexport="false">f7ad14aa-a3e2-4301-8822-d919845c8bcf(de.itemis.mps.editor.diagram.shapes)</dependency>
Expand All @@ -26,7 +25,7 @@
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
<language slang="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" version="0" />
<language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="1" />
<language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="2" />
<language slang="l:f2801650-65d5-424e-bb1b-463a8781b786:jetbrains.mps.baseLanguage.javadoc" version="2" />
<language slang="l:c7d5b9dd-a05f-4be2-bc73-f2e16994cc67:jetbrains.mps.baseLanguage.lightweightdsl" version="1" />
<language slang="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<child id="1068581242865" name="localVariableDeclaration" index="3cpWs9" />
</concept>
<concept id="1068581242863" name="jetbrains.mps.baseLanguage.structure.LocalVariableDeclaration" flags="nr" index="3cpWsn" />
<concept id="1204053956946" name="jetbrains.mps.baseLanguage.structure.IMethodCall" flags="ng" index="1ndlxa">
<concept id="1204053956946" name="jetbrains.mps.baseLanguage.structure.IMethodCall" flags="ngI" index="1ndlxa">
<reference id="1068499141037" name="baseMethodDeclaration" index="37wK5l" />
<child id="1068499141038" name="actualArgument" index="37wK5m" />
</concept>
Expand Down Expand Up @@ -115,7 +115,7 @@
<concept id="1133920641626" name="jetbrains.mps.lang.core.structure.BaseConcept" flags="ng" index="2VYdi">
<property id="1193676396447" name="virtualPackage" index="3GE5qa" />
</concept>
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ngI" index="TrEIO">
<property id="1169194664001" name="name" index="TrG5h" />
</concept>
</language>
Expand Down
Loading

0 comments on commit 51684d7

Please sign in to comment.