Skip to content

Commit 33292bb

Browse files
Improvements around JNA and build isolation
* Specify idea.config.path and idea.system.path for generation. If left unspecified, `<generate>` task will write under MPS home and this can be problematic in case of multiple builds running from the same MPS home in parallel. * Add an Ant property for the JNA path so that it can be easily overridden. When running tests from the generic distribution the path has to be overridden to point to the platform-specific subdirectory. However, it was previously hardcoded to `${artifacts.mps}/lib/jna` and impossible to override.
1 parent 36d715b commit 33292bb

File tree

172 files changed

+4065
-2978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+4065
-2978
lines changed

IdeaPlugin/mpsEditorTestsPlugin.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsEditorTestsPlugin" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsEditorTestsPlugin" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsEditorTestsPlugin" />
69
<property name="mps_home" location="${basedir}" />
@@ -65,6 +68,8 @@
6568
<target name="build" depends="assemble" />
6669

6770
<target name="clean">
71+
<delete dir="${build.mps.config.path}" />
72+
<delete dir="${build.mps.system.path}" />
6873
<delete dir="${build.tmp}" />
6974
<delete dir="${build.layout}" />
7075
</target>

IdeaPlugin/mpsIdeaMigration.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsIdeaMigration" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsIdeaMigration" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsIdeaMigration" />
69
<property name="plugin.version" value="1.1.SNAPSHOT" />
@@ -89,6 +92,8 @@
8992
<target name="build" depends="assemble" />
9093

9194
<target name="clean">
95+
<delete dir="${build.mps.config.path}" />
96+
<delete dir="${build.mps.system.path}" />
9297
<delete dir="${build.tmp}" />
9398
<delete dir="${build.layout}" />
9499
</target>

IdeaPlugin/mpsIdeaVcs.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsIdeaVcs" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsIdeaVcs" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsIdeaVcs" />
69
<property name="plugin.version" value="1.1.SNAPSHOT" />
@@ -101,6 +104,8 @@
101104
<target name="build" depends="assemble" />
102105

103106
<target name="clean">
107+
<delete dir="${build.mps.config.path}" />
108+
<delete dir="${build.mps.system.path}" />
104109
<delete dir="${build.tmp}" />
105110
<delete dir="${build.layout}" />
106111
</target>

IdeaPlugin/mpsJavaIdeaPlugin.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsJavaIdeaPlugin" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsJavaIdeaPlugin" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsJavaIdeaPlugin" />
69
<property name="mps_home" location="${basedir}" />
@@ -87,6 +90,8 @@
8790
<target name="build" depends="assemble" />
8891

8992
<target name="clean">
93+
<delete dir="${build.mps.config.path}" />
94+
<delete dir="${build.mps.system.path}" />
9095
<delete dir="${build.tmp}" />
9196
<delete dir="${build.layout}" />
9297
</target>

IdeaPlugin/mpsJpsIdea.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsJpsIdea" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsJpsIdea" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsJpsIdea" />
69
<property name="mps_home" location="${basedir}" />
@@ -70,6 +73,8 @@
7073
<target name="build" depends="assemble" />
7174

7275
<target name="clean">
76+
<delete dir="${build.mps.config.path}" />
77+
<delete dir="${build.mps.system.path}" />
7378
<delete dir="${build.tmp}" />
7479
<delete dir="${build.layout}" />
7580
</target>

IdeaPlugin/mpsJpsIdeaJ8Compatibility.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsJpsIdeaJ8Compatibility" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsJpsIdeaJ8Compatibility" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsJpsIdeaJ8Compatibility" />
69
<property name="mps_home" location="${basedir}" />
@@ -74,6 +77,8 @@
7477
<target name="build" depends="assemble" />
7578

7679
<target name="clean">
80+
<delete dir="${build.mps.config.path}" />
81+
<delete dir="${build.mps.system.path}" />
7782
<delete dir="${build.tmp}" />
7883
<delete dir="${build.layout}" />
7984
</target>

IdeaPlugin/mpsPlugin.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsPlugin" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsPlugin" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsPlugin" />
69
<property name="plugin.version" value="1.1.SNAPSHOT" />
@@ -96,6 +99,8 @@
9699
<target name="build" depends="assemble" />
97100

98101
<target name="clean">
102+
<delete dir="${build.mps.config.path}" />
103+
<delete dir="${build.mps.system.path}" />
99104
<delete dir="${build.tmp}" />
100105
<delete dir="${build.layout}" />
101106
</target>

IdeaPlugin/mpsPluginTests.xml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsPluginTests" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsPluginTests" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsPluginTests" />
69
<property name="idea_home" location="" />
@@ -127,6 +130,8 @@
127130
<target name="build" depends="assemble" />
128131

129132
<target name="clean">
133+
<delete dir="${build.mps.config.path}" />
134+
<delete dir="${build.mps.system.path}" />
130135
<delete dir="${build.tmp}" />
131136
<delete dir="${build.layout}" />
132137
</target>

build/jetpad.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="jetpad" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/jetpad" />
58
<property name="build.layout" location="${build.dir}/artifacts/jetpad" />
69
<property name="idea_home" location="" />
@@ -91,6 +94,8 @@
9194
<target name="build" depends="assemble" />
9295

9396
<target name="clean">
97+
<delete dir="${build.mps.config.path}" />
98+
<delete dir="${build.mps.system.path}" />
9499
<delete dir="${build.tmp}" />
95100
<delete dir="${build.layout}" />
96101
</target>
@@ -120,6 +125,9 @@
120125
<jvmargs>
121126
<arg value="-ea" />
122127
<arg value="-Xmx512m" />
128+
<arg value="-Didea.config.path=${build.mps.config.path}" />
129+
<arg value="-Didea.system.path=${build.mps.system.path}" />
130+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
123131
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
124132
</jvmargs>
125133
<macro name="idea_home" path="${idea_home}" />

build/mpsAntToolsPlugin.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsAntToolsPlugin" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsAntToolsPlugin" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsAntToolsPlugin" />
69
<property name="idea_home" location="" />
@@ -103,6 +106,8 @@
103106
<target name="build" depends="assemble" />
104107

105108
<target name="clean">
109+
<delete dir="${build.mps.config.path}" />
110+
<delete dir="${build.mps.system.path}" />
106111
<delete dir="${build.tmp}" />
107112
<delete dir="${build.layout}" />
108113
</target>
@@ -231,6 +236,9 @@
231236
<jvmargs>
232237
<arg value="-ea" />
233238
<arg value="-Xmx512m" />
239+
<arg value="-Didea.config.path=${build.mps.config.path}" />
240+
<arg value="-Didea.system.path=${build.mps.system.path}" />
241+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
234242
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
235243
</jvmargs>
236244
<macro name="idea_home" path="${idea_home}" />

build/mpsBootstrapCore.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsBootstrapCore" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsBootstrapCore" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsBootstrapCore" />
69
<property name="version.major" value="2023" />
@@ -16486,6 +16489,8 @@
1648616489
<target name="build" depends="assemble" />
1648716490

1648816491
<target name="clean">
16492+
<delete dir="${build.mps.config.path}" />
16493+
<delete dir="${build.mps.system.path}" />
1648916494
<delete dir="${build.tmp}" />
1649016495
<delete dir="${build.layout}" />
1649116496
</target>
@@ -16689,6 +16694,9 @@
1668916694
<jvmargs>
1669016695
<arg value="-ea" />
1669116696
<arg value="-Xmx512m" />
16697+
<arg value="-Didea.config.path=${build.mps.config.path}" />
16698+
<arg value="-Didea.system.path=${build.mps.system.path}" />
16699+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
1669216700
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
1669316701
</jvmargs>
1669416702
<macro name="idea_home" path="${idea_home}" />

build/mpsBuild.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsBuild" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsBuild" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsBuild" />
69
<property name="idea_home" location="" />
@@ -1592,6 +1595,8 @@
15921595
<target name="build" depends="assemble" />
15931596

15941597
<target name="clean">
1598+
<delete dir="${build.mps.config.path}" />
1599+
<delete dir="${build.mps.system.path}" />
15951600
<delete dir="${build.tmp}" />
15961601
<delete dir="${build.layout}" />
15971602
</target>
@@ -1766,6 +1771,9 @@
17661771
<jvmargs>
17671772
<arg value="-ea" />
17681773
<arg value="-Xmx512m" />
1774+
<arg value="-Didea.config.path=${build.mps.config.path}" />
1775+
<arg value="-Didea.system.path=${build.mps.system.path}" />
1776+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
17691777
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
17701778
</jvmargs>
17711779
<macro name="idea_home" path="${idea_home}" />

build/mpsBuildUI.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsBuildUI" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsBuildUI" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsBuildUI" />
69
<property name="idea_home" location="" />
@@ -334,6 +337,8 @@
334337
<target name="build" depends="assemble" />
335338

336339
<target name="clean">
340+
<delete dir="${build.mps.config.path}" />
341+
<delete dir="${build.mps.system.path}" />
337342
<delete dir="${build.tmp}" />
338343
<delete dir="${build.layout}" />
339344
</target>
@@ -484,6 +489,9 @@
484489
<jvmargs>
485490
<arg value="-ea" />
486491
<arg value="-Xmx512m" />
492+
<arg value="-Didea.config.path=${build.mps.config.path}" />
493+
<arg value="-Didea.system.path=${build.mps.system.path}" />
494+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
487495
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
488496
</jvmargs>
489497
<macro name="idea_home" path="${idea_home}" />

build/mpsConsolePlugin.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsConsolePlugin" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsConsolePlugin" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsConsolePlugin" />
69
<property name="idea_home" location="" />
@@ -1101,6 +1104,8 @@
11011104
<target name="build" depends="assemble" />
11021105

11031106
<target name="clean">
1107+
<delete dir="${build.mps.config.path}" />
1108+
<delete dir="${build.mps.system.path}" />
11041109
<delete dir="${build.tmp}" />
11051110
<delete dir="${build.layout}" />
11061111
</target>
@@ -1273,6 +1278,9 @@
12731278
<jvmargs>
12741279
<arg value="-ea" />
12751280
<arg value="-Xmx512m" />
1281+
<arg value="-Didea.config.path=${build.mps.config.path}" />
1282+
<arg value="-Didea.system.path=${build.mps.system.path}" />
1283+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
12761284
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
12771285
</jvmargs>
12781286
<macro name="idea_home" path="${idea_home}" />

build/mpsContextActionsTool.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsContextActionsTool" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsContextActionsTool" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsContextActionsTool" />
69
<property name="idea_home" location="" />
@@ -339,6 +342,8 @@
339342
<target name="build" depends="assemble" />
340343

341344
<target name="clean">
345+
<delete dir="${build.mps.config.path}" />
346+
<delete dir="${build.mps.system.path}" />
342347
<delete dir="${build.tmp}" />
343348
<delete dir="${build.layout}" />
344349
</target>
@@ -493,6 +498,9 @@
493498
<jvmargs>
494499
<arg value="-ea" />
495500
<arg value="-Xmx512m" />
501+
<arg value="-Didea.config.path=${build.mps.config.path}" />
502+
<arg value="-Didea.system.path=${build.mps.system.path}" />
503+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
496504
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
497505
</jvmargs>
498506
<macro name="idea_home" path="${idea_home}" />

build/mpsCore.xml

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<project name="mpsCore" default="build" basedir="..">
22
<!-- Generated by MPS -->
33
<property name="build.dir" location="build" />
4+
<property name="build.mps.config.path" location="${build.dir}/config" />
5+
<property name="build.mps.system.path" location="${build.dir}/system" />
6+
<property name="build.jna.library.path" location="${mps_home}/lib/jna" />
47
<property name="build.tmp" location="${build.dir}/tmp/mpsCore" />
58
<property name="build.layout" location="${build.dir}/artifacts/mpsCore" />
69
<property name="idea_home" location="" />
@@ -755,6 +758,8 @@
755758
<target name="build" depends="assemble" />
756759

757760
<target name="clean">
761+
<delete dir="${build.mps.config.path}" />
762+
<delete dir="${build.mps.system.path}" />
758763
<delete dir="${build.tmp}" />
759764
<delete dir="${build.layout}" />
760765
</target>
@@ -911,6 +916,9 @@
911916
<jvmargs>
912917
<arg value="-ea" />
913918
<arg value="-Xmx512m" />
919+
<arg value="-Didea.config.path=${build.mps.config.path}" />
920+
<arg value="-Didea.system.path=${build.mps.system.path}" />
921+
<arg value="-Djna.boot.library.path=${build.jna.library.path}" />
914922
<arg value="--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" />
915923
</jvmargs>
916924
<macro name="idea_home" path="${idea_home}" />

0 commit comments

Comments
 (0)