Skip to content

Commit 548afe3

Browse files
committed
[GR-19220] Add notes on passing --env to mx for the Eclipse setup and using MX_BUILD_EXPLODED/LINKY_LAYOUT (#2440)
PullRequest: truffleruby/2909
2 parents fd0f34e + 3fd73dc commit 548afe3

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

doc/contributor/using-eclipse.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,23 @@ annotation processing which cause the incremental build to fail regularly and
1111
need a full rebuild. For these reason, we recommend
1212
[IntelliJ](using-intellij.md) nowadays.
1313

14-
## Build TruffleRuby
14+
## Basic Setup
15+
16+
### Build TruffleRuby
1517

1618
First, make sure the project is already built from the command line:
1719

1820
```bash
1921
jt build
2022
```
2123

22-
## Generate the Project Files
24+
### Generate the Project Files
2325

2426
```bash
2527
jt mx eclipseinit
2628
```
2729

28-
## Import the Projects
30+
### Import the Projects
2931

3032
Create a new workspace in Eclipse (>= Luna).
3133

@@ -41,9 +43,35 @@ There should be now 4 projects in your workspace:
4143
* `TRUFFLERUBY-TEST.dist`
4244
* `TRUFFLERUBY.dist`
4345

44-
## Running from the Eclipse Files Directly
46+
## Advanced Setup
47+
48+
**Note:** This setup is not widely tested.
49+
50+
When building using specific env files, with `JT_ENV` or `--env`, mx will
51+
need to be told about it explicitly. For instance:
52+
53+
```bash
54+
jt mx --env jvm-ce eclipseinit
55+
```
56+
57+
When working on the Graal/Truffle code itself, adding the following two lines
58+
to the used env file, for instance `mx.truffleruby/jvm-ce` will
59+
configure the build so that incremental compilation and even hot code
60+
replacement works:
61+
62+
```bash
63+
MX_BUILD_EXPLODED=true
64+
LINKY_LAYOUT=*.jar
65+
```
66+
67+
These settings must not be used for producing distributable artifacts, but
68+
make development much smoother.
69+
70+
With these settings, after changes are made, one can simply run for instance
71+
the following, without having to trigger a build again:
4572

4673
```bash
4774
jt ruby -e 'p Truffle'
4875
Truffle
4976
```
77+

0 commit comments

Comments
 (0)