Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed tree-shaking language exporter may list entities twice #91

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.AnnotationAnnotates_Node/io.lionweb.mps.converter.deps.AnnotationAnnotates_Node.mpl" folder="test.dependencies" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.AnnotationExtends/io.lionweb.mps.converter.deps.AnnotationExtends.mpl" folder="test.dependencies" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.AnnotationImplements/io.lionweb.mps.converter.deps.AnnotationImplements.mpl" folder="test.dependencies" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.mpl" folder="test.dependencies" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.ConceptExtends/io.lionweb.mps.converter.deps.ConceptExtends.mpl" folder="test.dependencies" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.ConceptImplements/io.lionweb.mps.converter.deps.ConceptImplements.mpl" folder="test.dependencies" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.deps.ContainmentType/io.lionweb.mps.converter.deps.ContainmentType.mpl" folder="test.dependencies" />
Expand Down
9 changes: 5 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ val apacheCliVersion: String by project
repositories {
maven(url = "https://artifacts.itemis.cloud/repository/maven-mps")
mavenCentral()
mavenLocal()
mavenLocal()
}

dependencies {
"mps"("com.jetbrains:mps:$mpsVersion")
// only needed for tests, but such a config is missing
// /~https://github.com/specificlanguages/mps-gradle-plugin/issues/9
// "generation" ("de.itemis.mps:extensions:$mpsExtensionsVersion")
// "generation" ("de.itemis.mps:extensions:$mpsExtensionsVersion")
}

group = "io.lionweb"
Expand Down Expand Up @@ -61,7 +61,7 @@ task("testCmdLineExport") {


publishing {
val ossrhUsername = (project.findProperty("ossrhUsername")?: System.getenv("OSSRH_USERNAME")) as String?
val ossrhUsername = (project.findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")) as String?
val ossrhPassword = (project.findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")) as String?

repositories {
Expand Down Expand Up @@ -149,6 +149,7 @@ stubs {
configurations.getByName("libs") {
attributes {
attribute(Attribute.of("org.gradle.dependency.bundling", String::class.java), "external")
attribute(TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE, project.objects.named(TargetJvmEnvironment::class.java, TargetJvmEnvironment.STANDARD_JVM))
}
}

Expand All @@ -160,7 +161,7 @@ tasks.withType(Sign::class) {
* Assures ascii-armored gpg key contains newlines.
*/
fun restoreNewlines(encodedString: String?): String? {
if(encodedString != null && !encodedString.contains('\n')) {
if (encodedString != null && !encodedString.contains('\n')) {
return encodedString.replace("\\n", "\n")
}
return encodedString
Expand Down
105 changes: 104 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2503,6 +2503,64 @@
<zipfileset file="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.Standalone/io.lionweb.mps.converter.deps.Standalone.mpl" prefix="module" />
<zipfileset dir="${build.tmp}/customProcessors/copyModels/languages-io.lionweb.mps.converter.deps.Standalone-models" prefix="module/models" />
</jar>
<mkdir dir="${build.tmp}/default/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.jar" />
<mkdir dir="${build.tmp}/default/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.jar/META-INF" />
<echoxml file="${build.tmp}/default/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.jar/META-INF/module.xml">
<module namespace="io.lionweb.mps.converter.deps.AvoidMultipleConcepts" type="language" uuid="44b96222-a1ce-437c-a402-7c62f0d897e5">
<dependencies>
<module ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" kind="rt" />
<module ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" kind="rt" />
<module ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" kind="rt" />
<module ref="4c6a28d1-2c60-478d-b36e-db9b3cbb21fb(closures.runtime)" kind="rt" />
<module ref="9b80526e-f0bf-4992-bdf5-cee39c1833f3(collections.runtime)" kind="rt" />
<module ref="a3e4657f-a76c-45bb-bbda-c764596ecc65(jetbrains.mps.baseLanguage.logging.runtime)" kind="rt" />
<module ref="52b81ac7-93fd-4e9e-b972-4995882da6d4(jetbrains.mps.baseLanguage.references.runtime)" kind="rt" />
<module ref="d44dab97-aaac-44cb-9745-8a14db674c03(jetbrains.mps.baseLanguage.tuples.runtime)" kind="rt" />
<module ref="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" kind="rt" />
<module ref="d936855b-48da-4812-a8a0-2bfddd633ac4(jetbrains.mps.lang.behavior.runtime)" kind="rt" />
<module ref="9a4afe51-f114-4595-b5df-048ce3c596be(jetbrains.mps.runtime)" kind="rt" />
<module ref="a9e4c532-c5f5-4bb7-99ef-42abb73bbb70(jetbrains.mps.lang.descriptor.aspects)" kind="cl" />
</dependencies>
<uses>
<language id="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" />
<language id="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" />
<language id="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" />
<language id="l:f2801650-65d5-424e-bb1b-463a8781b786:jetbrains.mps.baseLanguage.javadoc" />
<language id="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" />
<language id="l:a247e09e-2435-45ba-b8d2-07e93feba96a:jetbrains.mps.baseLanguage.tuples" />
<language id="l:af65afd8-f0dd-4942-87d9-63a55f2a9db1:jetbrains.mps.lang.behavior" />
<language id="l:f4ad079d-bc71-4ffb-9600-9328705cf998:jetbrains.mps.lang.descriptor" />
<language id="l:3a13115c-633c-4c5c-bbcc-75c4219e9555:jetbrains.mps.lang.quotation" />
<language id="l:982eb8df-2c96-4bd7-9963-11712ea622e5:jetbrains.mps.lang.resources" />
<language id="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" />
<language id="l:c72da2b9-7cce-4447-8389-f407dc1158b7:jetbrains.mps.lang.structure" />
<language id="l:c7fb639f-be78-4307-89b0-b5959c3fa8c8:jetbrains.mps.lang.text" />
</uses>
<classpath>
<entry path="." />
</classpath>
<sources jar="io.lionweb.mps.converter.deps.AvoidMultipleConcepts-src.jar" descriptor="io.lionweb.mps.converter.deps.AvoidMultipleConcepts.mpl" />
</module>
</echoxml>
<jar destfile="${build.layout}/io.lionweb.mps.tests.contributions/languages/lionweb-mps-tests.contributions/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.jar" duplicate="preserve">
<fileset dir="${build.tmp}/java/out/io.lionweb.mps.converter.deps.AvoidMultipleConcepts" />
<fileset dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.Standalone" includes="icons/**, resources/**" />
<fileset dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/source_gen" includes="**/trace.info, **/exports, **/*.mps, **/checkpoints" />
<fileset dir="${build.tmp}/default/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.jar" />
</jar>
<copyModels todir="${build.tmp}/customProcessors/copyModels/languages-io.lionweb.mps.converter.deps.AvoidMultipleConcepts-models">
<fileset dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/models" includes="**/*.mps, **/*.mpsr, **/.model" />
</copyModels>
<jar destfile="${build.layout}/io.lionweb.mps.tests.contributions/languages/lionweb-mps-tests.contributions/io.lionweb.mps.converter.deps.AvoidMultipleConcepts-src.jar" duplicate="preserve">
<fileset dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/source_gen">
<exclude name="**/trace.info" />
<exclude name="**/exports" />
<exclude name="**/checkpoints" />
<exclude name="**/*.mps" />
</fileset>
<zipfileset file="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.mpl" prefix="module" />
<zipfileset dir="${build.tmp}/customProcessors/copyModels/languages-io.lionweb.mps.converter.deps.AvoidMultipleConcepts-models" prefix="module/models" />
</jar>
<mkdir dir="${build.tmp}/default/io.lionweb.mps.converter.test.support.jar" />
<mkdir dir="${build.tmp}/default/io.lionweb.mps.converter.test.support.jar/META-INF" />
<echoxml file="${build.tmp}/default/io.lionweb.mps.converter.test.support.jar/META-INF/module.xml">
Expand Down Expand Up @@ -2848,7 +2906,7 @@
<delete dir="${build.layout}" />
</target>

<target name="compileJava" depends="java.compile.io.lionweb.mps.m3, java.compile.io.lionweb.mps.m3.runtime, java.compile.io.lionweb.mps.structure.attribute, java.compile.io.lionweb.mps.specific, java.compile.io.lionweb.mps.server.plugin, java.compile.io.lionweb.mps.converter, java.compile.io.lionweb.mps.json, java.compile.java.modules.cycle.1, java.compile.io.lionweb.mps.converter.lang, java.compile.io.lionweb.mps.converter.lang.runtime, java.compile.io.lionweb.mps.client.connector, java.compile.io.lionweb.mps.client.ideaPlugin, java.compile.io.lionweb.mps.client.persistence, java.compile.io.lionweb.mps.cmdline, java.compile.io.lionweb.mps.build, java.compile.io.lionweb.mps.converter.TestAllBuiltins, java.compile.io.lionweb.mps.testsupport, java.compile.io.lionweb.mps.testsupport.generator, java.compile.io.lionweb.mps.converter.TestLang, java.compile.io.lionweb.mps.converter.TestLang2, java.compile.io.lionweb.mps.converter.TestLang3, java.compile.library, java.compile.MultiRefLang, java.compile.io.lionweb.mps.converter.TestCoreRefLang, java.compile.io.lionweb.mps.converter.TestCustomDatatype, java.compile.io.lionweb.mps.converter.TestAnnotation, java.compile.io.lionweb.mps.converter.TestRefs, java.compile.io.lionweb.mps.converter.deps.AnnotationAnnotates, java.compile.io.lionweb.mps.converter.deps.AnnotationAnnotates_Node, java.compile.io.lionweb.mps.converter.deps.AnnotationExtends, java.compile.io.lionweb.mps.converter.deps.AnnotationImplements, java.compile.io.lionweb.mps.converter.deps.ConceptExtends, java.compile.io.lionweb.mps.converter.deps.ConceptImplements, java.compile.io.lionweb.mps.converter.deps.ContainmentType, java.compile.io.lionweb.mps.converter.deps.InterfaceExtends, java.compile.io.lionweb.mps.converter.deps.LanguageDepends, java.compile.io.lionweb.mps.converter.deps.OnlyBuiltins, java.compile.io.lionweb.mps.converter.deps.PropertyType, java.compile.io.lionweb.mps.converter.deps.ReferenceType, java.compile.io.lionweb.mps.converter.deps.SmartReferenceType, java.compile.io.lionweb.mps.converter.deps.Standalone, java.compile.io.lionweb.mps.converter.test.support, java.compile.io.lionweb.mps.json.test.support, java.compile.io.lionweb.mps.lang.test, java.compile.io.lionweb.mps.json.test, java.compile.io.lionweb.mps.converter.test" />
<target name="compileJava" depends="java.compile.io.lionweb.mps.m3, java.compile.io.lionweb.mps.m3.runtime, java.compile.io.lionweb.mps.structure.attribute, java.compile.io.lionweb.mps.specific, java.compile.io.lionweb.mps.server.plugin, java.compile.io.lionweb.mps.converter, java.compile.io.lionweb.mps.json, java.compile.java.modules.cycle.1, java.compile.io.lionweb.mps.converter.lang, java.compile.io.lionweb.mps.converter.lang.runtime, java.compile.io.lionweb.mps.client.connector, java.compile.io.lionweb.mps.client.ideaPlugin, java.compile.io.lionweb.mps.client.persistence, java.compile.io.lionweb.mps.cmdline, java.compile.io.lionweb.mps.build, java.compile.io.lionweb.mps.converter.TestAllBuiltins, java.compile.io.lionweb.mps.testsupport, java.compile.io.lionweb.mps.testsupport.generator, java.compile.io.lionweb.mps.converter.TestLang, java.compile.io.lionweb.mps.converter.TestLang2, java.compile.io.lionweb.mps.converter.TestLang3, java.compile.library, java.compile.MultiRefLang, java.compile.io.lionweb.mps.converter.TestCoreRefLang, java.compile.io.lionweb.mps.converter.TestCustomDatatype, java.compile.io.lionweb.mps.converter.TestAnnotation, java.compile.io.lionweb.mps.converter.TestRefs, java.compile.io.lionweb.mps.converter.deps.AnnotationAnnotates, java.compile.io.lionweb.mps.converter.deps.AnnotationAnnotates_Node, java.compile.io.lionweb.mps.converter.deps.AnnotationExtends, java.compile.io.lionweb.mps.converter.deps.AnnotationImplements, java.compile.io.lionweb.mps.converter.deps.ConceptExtends, java.compile.io.lionweb.mps.converter.deps.ConceptImplements, java.compile.io.lionweb.mps.converter.deps.ContainmentType, java.compile.io.lionweb.mps.converter.deps.InterfaceExtends, java.compile.io.lionweb.mps.converter.deps.LanguageDepends, java.compile.io.lionweb.mps.converter.deps.OnlyBuiltins, java.compile.io.lionweb.mps.converter.deps.PropertyType, java.compile.io.lionweb.mps.converter.deps.ReferenceType, java.compile.io.lionweb.mps.converter.deps.SmartReferenceType, java.compile.io.lionweb.mps.converter.deps.Standalone, java.compile.io.lionweb.mps.converter.deps.AvoidMultipleConcepts, java.compile.io.lionweb.mps.converter.test.support, java.compile.io.lionweb.mps.json.test.support, java.compile.io.lionweb.mps.lang.test, java.compile.io.lionweb.mps.json.test, java.compile.io.lionweb.mps.converter.test" />

<target name="processResources" />

Expand Down Expand Up @@ -2991,6 +3049,7 @@
<module file="${basedir}/solutions/io.lionweb.mps.client.ideaPlugin/io.lionweb.mps.client.ideaPlugin.msd" />
<module file="${lionweb-mps.home}/languages/io.lionweb.mps.converter.TestCoreRefLang/io.lionweb.mps.converter.TestCoreRefLang.mpl" />
<module file="${lionweb-mps.home}/languages/io.lionweb.mps.converter.TestLang/io.lionweb.mps.converter.TestLang.mpl" />
<module file="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/io.lionweb.mps.converter.deps.AvoidMultipleConcepts.mpl" />
<module file="${lionweb-mps.home}/languages/io.lionweb.mps.structure.attribute/io.lionweb.mps.structure.attribute.mpl" />
<module file="${lionweb-mps.home}/languages/io.lionweb.mps.testsupport/io.lionweb.mps.testsupport.mpl" />
<module file="${lionweb-mps.home}/languages/library/library.mpl" />
Expand Down Expand Up @@ -5036,6 +5095,49 @@
</copy>
</target>

<target name="java.compile.io.lionweb.mps.converter.deps.AvoidMultipleConcepts" depends="fetchDependencies">
<mkdir dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/source_gen" />
<mkdir dir="${build.tmp}/java/out/io.lionweb.mps.converter.deps.AvoidMultipleConcepts" />
<javac destdir="${build.tmp}/java/out/io.lionweb.mps.converter.deps.AvoidMultipleConcepts" fork="false" encoding="utf8" includeantruntime="false" debug="true">
<compilerarg value="-Xlint:none" />
<src>
<path location="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/source_gen" />
</src>
<classpath>
<fileset file="${artifacts.mps}/lib/mps-core.jar" />
<fileset file="${artifacts.mps}/lib/mps-annotations.jar" />
<fileset file="${artifacts.mps}/lib/mps-behavior-api.jar" />
<fileset file="${artifacts.mps}/lib/mps-behavior-runtime.jar" />
<fileset file="${artifacts.mps}/lib/mps-closures.jar" />
<fileset file="${artifacts.mps}/lib/mps-collections.jar" />
<fileset file="${artifacts.mps}/lib/mps-generator.jar" />
<fileset file="${artifacts.mps}/lib/mps-openapi.jar" />
<fileset file="${artifacts.mps}/lib/mps-logging.jar" />
<fileset file="${artifacts.mps}/lib/mps-tuples.jar" />
<fileset file="${artifacts.mps}/lib/mps-references.jar" />
<fileset file="${artifacts.mps}/lib/mps-messaging.jar" />
<fileset file="${artifacts.mps}/lib/mps-boot-util.jar" />
<fileset file="${artifacts.mps}/lib/mps-context.jar" />
<fileset file="${artifacts.mps}/lib/mps-constraints-runtime.jar" />
<fileset file="${artifacts.mps}/lib/mps-persistence.jar" />
<fileset file="${artifacts.mps}/lib/mps-project-check.jar" />
<fileset file="${artifacts.mps}/lib/mps-textgen.jar" />
<fileset file="${artifacts.IDEA}/lib/annotations.jar" />
<fileset file="${artifacts.IDEA}/lib/log4j.jar" />
<fileset file="${artifacts.IDEA}/lib/jdom.jar" />
<fileset file="${artifacts.IDEA}/lib/trove4j.jar" />
<fileset file="${artifacts.IDEA}/lib/ecj-4.16.jar" />
<fileset file="${artifacts.IDEA}/plugins/java/lib/ecj-4.16.jar" />
<fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.logging.runtime.jar" />
<fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
<fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.aspects.jar" />
</classpath>
</javac>
<copy todir="${build.tmp}/java/out/io.lionweb.mps.converter.deps.AvoidMultipleConcepts">
<fileset dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/source_gen" excludes="**/*.java" />
</copy>
</target>

<target name="java.compile.io.lionweb.mps.converter.test.support" depends="java.compile.io.lionweb.mps.converter, java.compile.io.lionweb.mps.m3, java.compile.io.lionweb.mps.m3.runtime, fetchDependencies">
<mkdir dir="${lionweb-mps.home}/solutions/io.lionweb.mps.converter.test.support/source_gen" />
<mkdir dir="${build.tmp}/java/out/io.lionweb.mps.converter.test.support" />
Expand Down Expand Up @@ -5588,6 +5690,7 @@
<delete dir="${lionweb-mps.home}/solutions/io.lionweb.mps.client.ideaPlugin/source_gen" />
<delete dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.TestCoreRefLang/source_gen" />
<delete dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.TestLang/source_gen" />
<delete dir="${lionweb-mps.home}/languages/io.lionweb.mps.converter.deps.AvoidMultipleConcepts/source_gen" />
<delete dir="${lionweb-mps.home}/languages/io.lionweb.mps.structure.attribute/source_gen" />
<delete dir="${lionweb-mps.home}/languages/io.lionweb.mps.testsupport/source_gen" />
<delete dir="${lionweb-mps.home}/languages/io.lionweb.mps.testsupport/generator/source_gen" />
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version=0.2.3-SNAPSHOT
lionwebRelease=2023.1
lionwebJavaVersion=0.2.3
lionwebJavaVersion=0.2.9
mpsVersionSuffix=2021.1
mpsVersion=2021.1.4
mpsExtensionsVersion=2021.1.2365.a4d7bb2
Expand Down
Loading
Loading