Skip to content

Commit

Permalink
Merge pull request #107 from LionWeb-io/niko/export-deprecated
Browse files Browse the repository at this point in the history
Export @deprecated annotations on language elements
  • Loading branch information
enikao authored Oct 15, 2024
2 parents c56025e + 09964a3 commit a4b5e21
Show file tree
Hide file tree
Showing 22 changed files with 4,495 additions and 14 deletions.
1 change: 1 addition & 0 deletions .mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestComputedProperty/io.lionweb.mps.converter.TestComputedProperty.mpl" folder="test.langs" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestCoreRefLang/io.lionweb.mps.converter.TestCoreRefLang.mpl" folder="test.langs" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestCustomDatatype/io.lionweb.mps.converter.TestCustomDatatype.mpl" folder="test.langs" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestDeprecated/io.lionweb.mps.converter.TestDeprecated.mpl" folder="test.langs" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestLang/io.lionweb.mps.converter.TestLang.mpl" folder="test.langs" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestLang2/io.lionweb.mps.converter.TestLang2.mpl" folder="test.langs" />
<modulePath path="$PROJECT_DIR$/languages/io.lionweb.mps.converter.TestLang3/io.lionweb.mps.converter.TestLang3.mpl" folder="test.langs" />
Expand Down
106 changes: 105 additions & 1 deletion build.xml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/reference/converter-lang.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ Converts all listed languages completely.
If any element in the listed languages uses an element from a non-listed language, we include the element of the non-listed language -- but not any other elements of that non-listed language.
We apply this strategy (known as _tree shaking_) transitively until we included all used elements.

We can set some flags for special annotation handling:

[horizontal]
export description annotations::
Whether concept descriptions should be exported as instances of `io.lionweb.mps.specific.lang.MPS-specific annotations.ConceptDescription`.

export special annotations::
Whether special concept annotations should be exported:
+
* `jetbrains.mps.lang.structure.structure.DeprecatedNodeAnnotation` -> `io.lionweb.mps.specific.lang.MPS-specific annotations.Deprecated`

[[instance-json]]
== MPS Instance Model &harr; JSON
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<language namespace="io.lionweb.mps.converter.TestDeprecated" uuid="09360184-8598-44e7-9bf5-fb1ce45a480a" languageVersion="0" moduleVersion="0">
<models>
<modelRoot contentPath="${module}" type="default">
<sourceRoot location="models" />
</modelRoot>
</models>
<facets>
<facet type="java">
<classes generated="true" path="${module}/classes_gen" />
</facet>
</facets>
<accessoryModels />
<sourcePath />
<languageVersions>
<language slang="l:411e5b27-8a76-482e-8af8-1704262b4468:io.lionweb.mps.structure.attribute" version="0" />
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="11" />
<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: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" />
<language slang="l:af65afd8-f0dd-4942-87d9-63a55f2a9db1:jetbrains.mps.lang.behavior" version="2" />
<language slang="l:ceab5195-25ea-4f22-9b92-103b95ca8c0c:jetbrains.mps.lang.core" version="2" />
<language slang="l:f4ad079d-bc71-4ffb-9600-9328705cf998:jetbrains.mps.lang.descriptor" version="0" />
<language slang="l:446c26eb-2b7b-4bf0-9b35-f83fa582753e:jetbrains.mps.lang.modelapi" version="0" />
<language slang="l:3a13115c-633c-4c5c-bbcc-75c4219e9555:jetbrains.mps.lang.quotation" version="5" />
<language slang="l:982eb8df-2c96-4bd7-9963-11712ea622e5:jetbrains.mps.lang.resources" version="2" />
<language slang="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" version="18" />
<language slang="l:c72da2b9-7cce-4447-8389-f407dc1158b7:jetbrains.mps.lang.structure" version="9" />
<language slang="l:c7fb639f-be78-4307-89b0-b5959c3fa8c8:jetbrains.mps.lang.text" version="0" />
<language slang="l:9ded098b-ad6a-4657-bfd9-48636cfe8bc3:jetbrains.mps.lang.traceable" version="0" />
</languageVersions>
<dependencyVersions>
<module reference="3f233e7f-b8a6-46d2-a57f-795d56775243(Annotations)" version="0" />
<module reference="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" version="0" />
<module reference="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" version="0" />
<module reference="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" version="0" />
<module reference="09360184-8598-44e7-9bf5-fb1ce45a480a(io.lionweb.mps.converter.TestDeprecated)" version="0" />
<module reference="ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)" version="0" />
<module reference="a9e4c532-c5f5-4bb7-99ef-42abb73bbb70(jetbrains.mps.lang.descriptor.aspects)" version="0" />
</dependencyVersions>
<extendedLanguages />
</language>

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<model ref="r:61fc58ed-083c-441a-a576-e58049d4485c(io.lionweb.mps.converter.TestDeprecated.behavior)">
<persistence version="9" />
<languages>
<use id="7866978e-a0f0-4cc7-81bc-4d213d9375e1" name="jetbrains.mps.lang.smodel" version="18" />
<use id="af65afd8-f0dd-4942-87d9-63a55f2a9db1" name="jetbrains.mps.lang.behavior" version="2" />
<devkit ref="fbc25dd2-5da4-483a-8b19-70928e1b62d7(jetbrains.mps.devkit.general-purpose)" />
</languages>
<imports />
<registry />
</model>

Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<model ref="r:3a8b47e5-fb10-4397-85b3-d41b7aa24493(io.lionweb.mps.converter.TestDeprecated.structure)">
<persistence version="9" />
<languages>
<use id="c72da2b9-7cce-4447-8389-f407dc1158b7" name="jetbrains.mps.lang.structure" version="9" />
<use id="411e5b27-8a76-482e-8af8-1704262b4468" name="io.lionweb.mps.structure.attribute" version="0" />
<devkit ref="78434eb8-b0e5-444b-850d-e7c4ad2da9ab(jetbrains.mps.devkit.aspect.structure)" />
</languages>
<imports>
<import index="tpck" ref="r:00000000-0000-4000-0000-011c89590288(jetbrains.mps.lang.core.structure)" implicit="true" />
</imports>
<registry>
<language id="c72da2b9-7cce-4447-8389-f407dc1158b7" name="jetbrains.mps.lang.structure">
<concept id="3348158742936976480" name="jetbrains.mps.lang.structure.structure.EnumerationMemberDeclaration" flags="ng" index="25R33">
<property id="1421157252384165432" name="memberId" index="3tVfz5" />
</concept>
<concept id="3348158742936976479" name="jetbrains.mps.lang.structure.structure.EnumerationDeclaration" flags="ng" index="25R3W">
<child id="3348158742936976577" name="members" index="25R1y" />
</concept>
<concept id="1224240836180" name="jetbrains.mps.lang.structure.structure.DeprecatedNodeAnnotation" flags="ig" index="asaX9">
<property id="1225118929411" name="build" index="YLPcu" />
<property id="1225118933224" name="comment" index="YLQ7P" />
</concept>
<concept id="1082978164218" name="jetbrains.mps.lang.structure.structure.DataTypeDeclaration" flags="ng" index="AxPO6">
<property id="7791109065626895363" name="datatypeId" index="3F6X1D" />
</concept>
<concept id="1082978499127" name="jetbrains.mps.lang.structure.structure.ConstrainedDataTypeDeclaration" flags="ng" index="Az7Fb">
<property id="1083066089218" name="constraint" index="FLfZY" />
</concept>
<concept id="2992811758677295509" name="jetbrains.mps.lang.structure.structure.AttributeInfo" flags="ng" index="M6xJ_" />
<concept id="1169125787135" name="jetbrains.mps.lang.structure.structure.AbstractConceptDeclaration" flags="ig" index="PkWjJ">
<property id="6714410169261853888" name="conceptId" index="EcuMT" />
<child id="1071489727083" name="linkDeclaration" index="1TKVEi" />
<child id="1071489727084" name="propertyDeclaration" index="1TKVEl" />
</concept>
<concept id="1169125989551" name="jetbrains.mps.lang.structure.structure.InterfaceConceptDeclaration" flags="ig" index="PlHQZ" />
<concept id="1071489090640" name="jetbrains.mps.lang.structure.structure.ConceptDeclaration" flags="ig" index="1TIwiD">
<reference id="1071489389519" name="extends" index="1TJDcQ" />
</concept>
<concept id="1071489288299" name="jetbrains.mps.lang.structure.structure.PropertyDeclaration" flags="ig" index="1TJgyi">
<property id="241647608299431129" name="propertyId" index="IQ2nx" />
<reference id="1082985295845" name="dataType" index="AX2Wp" />
</concept>
<concept id="1071489288298" name="jetbrains.mps.lang.structure.structure.LinkDeclaration" flags="ig" index="1TJgyj">
<property id="1071599776563" name="role" index="20kJfa" />
<property id="1071599893252" name="sourceCardinality" index="20lbJX" />
<property id="1071599937831" name="metaClass" index="20lmBu" />
<property id="241647608299431140" name="linkId" index="IQ2ns" />
<reference id="1071599976176" name="target" index="20lvS9" />
</concept>
</language>
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
<concept id="1133920641626" name="jetbrains.mps.lang.core.structure.BaseConcept" flags="ng" index="2VYdi">
<child id="5169995583184591170" name="smodelAttribute" index="lGtFl" />
</concept>
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
<property id="1169194664001" name="name" index="TrG5h" />
</concept>
</language>
</registry>
<node concept="1TIwiD" id="6LPkCA$4tpA">
<property role="EcuMT" value="7815243479487993446" />
<property role="TrG5h" value="DeprConcept" />
<ref role="1TJDcQ" to="tpck:gw2VY9q" resolve="BaseConcept" />
<node concept="1TJgyi" id="6LPkCA$4tpD" role="1TKVEl">
<property role="IQ2nx" value="7815243479487993449" />
<property role="TrG5h" value="deprProp" />
<ref role="AX2Wp" to="tpck:fKAOsGN" resolve="string" />
<node concept="asaX9" id="6LPkCA$4tpF" role="lGtFl">
<property role="YLQ7P" value="deprProp comment" />
<property role="YLPcu" value="deprProp build" />
</node>
</node>
<node concept="asaX9" id="6LPkCA$4tpB" role="lGtFl">
<property role="YLQ7P" value="deprConcept comment" />
<property role="YLPcu" value="deprConcept build" />
</node>
<node concept="1TJgyj" id="6LPkCA$4tpH" role="1TKVEi">
<property role="IQ2ns" value="7815243479487993453" />
<property role="20lmBu" value="fLJjDmT/aggregation" />
<property role="20kJfa" value="deprChild" />
<property role="20lbJX" value="fLJekj5/_0__n" />
<ref role="20lvS9" node="6LPkCA$4tpJ" resolve="DeprIface" />
<node concept="asaX9" id="6LPkCA$4tpV" role="lGtFl">
<property role="YLQ7P" value="deprChild comment" />
<property role="YLPcu" value="deprChild build" />
</node>
</node>
<node concept="1TJgyj" id="6LPkCA$4tpM" role="1TKVEi">
<property role="IQ2ns" value="7815243479487993458" />
<property role="20kJfa" value="deprRef" />
<property role="20lbJX" value="fLJekj4/_1" />
<ref role="20lvS9" node="6LPkCA$4tpP" resolve="DeprAnnotation" />
<node concept="asaX9" id="6LPkCA$4tpX" role="lGtFl">
<property role="YLQ7P" value="deprRef comment" />
<property role="YLPcu" value="deprRef build" />
</node>
</node>
</node>
<node concept="PlHQZ" id="6LPkCA$4tpJ">
<property role="EcuMT" value="7815243479487993455" />
<property role="TrG5h" value="DeprIface" />
<node concept="asaX9" id="6LPkCA$4tpK" role="lGtFl">
<property role="YLQ7P" value="deprIface comment" />
<property role="YLPcu" value="deprIface build" />
</node>
</node>
<node concept="1TIwiD" id="6LPkCA$4tpP">
<property role="EcuMT" value="7815243479487993461" />
<property role="TrG5h" value="DeprAnnotation" />
<ref role="1TJDcQ" to="tpck:2ULFgo8_XDk" resolve="NodeAttribute" />
<node concept="M6xJ_" id="6LPkCA$4tpQ" role="lGtFl" />
<node concept="asaX9" id="6LPkCA$4tpS" role="lGtFl">
<property role="YLQ7P" value="deprAnnotation comment" />
<property role="YLPcu" value="deprAnnotation build" />
</node>
</node>
<node concept="25R3W" id="6LPkCA$4tpZ">
<property role="3F6X1D" value="7815243479487993471" />
<property role="TrG5h" value="DeprEnum" />
<node concept="25R33" id="6LPkCA$4tq0" role="25R1y">
<property role="3tVfz5" value="7815243479487993472" />
<property role="TrG5h" value="A" />
</node>
<node concept="25R33" id="6LPkCA$4tq3" role="25R1y">
<property role="3tVfz5" value="7815243479487993475" />
<property role="TrG5h" value="B" />
</node>
<node concept="asaX9" id="6LPkCA$4tq1" role="lGtFl">
<property role="YLQ7P" value="deprEnum comment" />
<property role="YLPcu" value="deprEnum build" />
</node>
</node>
<node concept="Az7Fb" id="6LPkCA$4tqc">
<property role="3F6X1D" value="7815243479487993484" />
<property role="TrG5h" value="DeprDatatype" />
<property role="FLfZY" value=".*" />
<node concept="asaX9" id="6LPkCA$4tqd" role="lGtFl">
<property role="YLQ7P" value="deprDatatype comment" />
<property role="YLPcu" value="deprDatatype build" />
</node>
</node>
<node concept="1TIwiD" id="6LPkCA_fd3p">
<property role="EcuMT" value="7815243479507587289" />
<property role="TrG5h" value="DeprNoComment" />
<ref role="1TJDcQ" to="tpck:gw2VY9q" resolve="BaseConcept" />
<node concept="asaX9" id="6LPkCA_fd8U" role="lGtFl" />
</node>
</model>

Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@
<ref role="1NtTu8" to="d0tf:5M8g5cT5W10" resolve="exportDescriptionAnnotations" />
</node>
</node>
<node concept="3EZMnI" id="6LPkCA_dTgd" role="3EZMnx">
<node concept="3F0ifn" id="6LPkCA_dTge" role="3EZMnx">
<property role="3F0ifm" value="Export special annotations:" />
</node>
<node concept="2iRfu4" id="6LPkCA_dTgf" role="2iSdaV" />
<node concept="3F0A7n" id="6LPkCA_dTgg" role="3EZMnx">
<ref role="1NtTu8" to="d0tf:6LPkCA_dTg9" resolve="exportSpecialAnnotations" />
</node>
</node>
</node>
<node concept="3F0ifn" id="1q44RFSZQQ1" role="3EZMnx" />
<node concept="3F0ifn" id="4Yo3buYkNTb" role="3EZMnx">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,22 @@
</node>
</node>
</node>
<node concept="3clFbF" id="6LPkCA_dUlM" role="3cqZAp">
<node concept="2OqwBi" id="6LPkCA_dULJ" role="3clFbG">
<node concept="37vLTw" id="6LPkCA_dUlK" role="2Oq$k0">
<ref role="3cqZAo" node="1q44RFT01lB" resolve="converter" />
</node>
<node concept="liA8E" id="6LPkCA_dUY9" role="2OqNvi">
<ref role="37wK5l" to="6peh:6LPkCA$Ryk5" resolve="setExportSpecialAnnotations" />
<node concept="2OqwBi" id="6LPkCA_dVng" role="37wK5m">
<node concept="2Sf5sV" id="6LPkCA_dVbO" role="2Oq$k0" />
<node concept="3TrcHB" id="6LPkCA_dVBV" role="2OqNvi">
<ref role="3TsBF5" to="d0tf:6LPkCA_dTg9" resolve="exportSpecialAnnotations" />
</node>
</node>
</node>
</node>
</node>
<node concept="3cpWs8" id="1q44RFT04hN" role="3cqZAp">
<node concept="3cpWsn" id="1q44RFT04hO" role="3cpWs9">
<property role="TrG5h" value="languages" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@
<property role="TrG5h" value="exportDescriptionAnnotations" />
<ref role="AX2Wp" to="tpck:fKAQMTB" resolve="boolean" />
</node>
<node concept="1TJgyi" id="6LPkCA_dTg9" role="1TKVEl">
<property role="IQ2nx" value="7815243479507244041" />
<property role="TrG5h" value="exportSpecialAnnotations" />
<ref role="AX2Wp" to="tpck:fKAQMTB" resolve="boolean" />
</node>
<node concept="PrWs8" id="1q44RFSZQBV" role="PzmwI">
<ref role="PrY4T" node="1q44RFSZQFB" resolve="ILanguageIdentityContainer" />
</node>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@
<ref role="2Rx9Fl" to="2pzz:2ju2syjnJjX" resolve="String" />
</node>
</node>
<node concept="2$GZ55" id="6LPkCA$5hYZ" role="2RzR6B">
<property role="2RzON1" value="Deprecated" />
<property role="TrG5h" value="Deprecated" />
<ref role="2$GZ54" to="i2js:19nRYgR_pax" resolve="IKeyed" />
<node concept="2RzOeU" id="6LPkCA$5hZ9" role="2RzPPN">
<property role="2RzON1" value="Deprecated-comment" />
<property role="TrG5h" value="comment" />
<property role="2RzO1C" value="true" />
<ref role="2Rx9Fl" to="2pzz:2ju2syjnJjX" resolve="String" />
</node>
<node concept="2RzOeU" id="6LPkCA$5hZe" role="2RzPPN">
<property role="2RzON1" value="Deprecated-build" />
<property role="TrG5h" value="build" />
<property role="2RzO1C" value="true" />
<ref role="2Rx9Fl" to="2pzz:2ju2syjnJjX" resolve="String" />
</node>
</node>
<node concept="2RzRkq" id="34Q84zMP1Uw" role="2RzRcN">
<ref role="2RzRkr" to="i2js:5sACIIs$PgG" resolve="LionCore_M3" />
</node>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,34 @@
<property role="2DM1AS" value="ConceptDescription" />
</node>
</node>
<node concept="1TIwiD" id="6LPkCA$4zbt">
<property role="EcuMT" value="7815243479488017117" />
<property role="TrG5h" value="Deprecated" />
<ref role="1TJDcQ" to="tpck:2ULFgo8_XDk" resolve="NodeAttribute" />
<node concept="M6xJ_" id="6LPkCA$4zbu" role="lGtFl">
<node concept="trNpa" id="6LPkCA$4_PR" role="EQaZv">
<ref role="trN6q" to="tpce:1ob16QT2yIl" resolve="INamedStructureElement" />
</node>
</node>
<node concept="1TJgyi" id="6LPkCA$4_PT" role="1TKVEl">
<property role="IQ2nx" value="7815243479488028025" />
<property role="TrG5h" value="comment" />
<ref role="AX2Wp" to="tpck:fKAOsGN" resolve="string" />
<node concept="2DM1AW" id="6LPkCA$4_PZ" role="lGtFl">
<property role="2DM1AS" value="Deprecated-comment" />
</node>
</node>
<node concept="1TJgyi" id="6LPkCA$4_PV" role="1TKVEl">
<property role="IQ2nx" value="7815243479488028027" />
<property role="TrG5h" value="build" />
<ref role="AX2Wp" to="tpck:fKAOsGN" resolve="string" />
<node concept="2DM1AW" id="6LPkCA$4_Q0" role="lGtFl">
<property role="2DM1AS" value="Deprecated-build" />
</node>
</node>
<node concept="2DM1AW" id="6LPkCA$4_PY" role="lGtFl">
<property role="2DM1AS" value="Deprecated" />
</node>
</node>
</model>

Loading

0 comments on commit a4b5e21

Please sign in to comment.