-
Notifications
You must be signed in to change notification settings - Fork 16
Development Environment Setup
- Maven >3.2.x (please refer to installation instructions)
- Java 1.8.x
Wollok 2.0 is planned to run on
- Eclipse 2019-09, for Java Developers
- Help > Install New Software, use these two dependencies (follow the links below, be sure to uncheck "Show only the latest versions of available software" to see them)
- Maven:
-Dtycho.disableP2Mirrors=true
is no longer required. In fact, it should be forced tofalse
, otherwise build will fail.
-
Maven build failed for project with SWT dependencies: since 4.10 Eclipse will not generate 32-bits product, so any class with a dependency to
Eclipse platform bundle
(like wollok.ui which has a dependency with SWT classes) will cause Maven build to fail. Solution was to remove 32-bits products. - Maven build failed in Travis - Linux using GTK headless with SWT, added Travis config setting the DISPLAY environment variable
-
New Eclipse product built locally crashed at startup: this happened because
equinox.ds
bundle replaced withfelix.scr
new one. Had to modify wollok_product.product file.
- Xtext Continuous Integration
- Xtext Release Notes
- Eclipse Bundles Migration Support (and previous one)
And also take a look at:
-
Download Eclipse Neon for Java Developers should be fine. Do not install "Eclipse DSL Tools" , because it comes with 2.10 XText Version which we are not willing to use.
-
Install XText Complete SDK 2.11 and XTend IDE 2.11 from update site. To do so, go to "Help" -> "Install New Software" and add this URL: http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/, be sure to uncheck "Show only the latest versions of available software" to see them).
-
Install xpect from update site (same as for xsemantics). Xpect 0.2.0 Version & JDT Unit Extension 0.1.0. http://www.xpect-tests.org/updatesite/nightly/
You'll need to install some eclipse maven connectors (check below in "importing into the IDE")
This should work independently of your IDE (eclipse)
-
Install git Following this instructions
-
Clone the repository
# using ssh
git clone [email protected]:uqbar-project/wollok.git
# or https
git clone https://github.com/uqbar-project/wollok.git
- Switch to "dev" branch, which is our main development branch. We don't directly modify the "master" branch
git checkout dev
Be sure that
- you are pointing to a JDK 1.8 in JAVA_HOME environment variable
- you have to configure MAVEN_OPTS with this setting
MAVEN_OPTS="-Xmx2048m -Duser.language=en -Duser.country=US -Dnl= -Dfile.encoding=UTF-8 -Darguments='-Dtycho.disableP2Mirrors=true' -Dtycho.disableP2Mirrors=true"
You can check this configuration
fernando@dodain-pc ~ $ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T13:41:47-03:00)
Maven home: /usr/local/apache-maven-3.3.9
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.8.0_45/jre
Default locale: en_US, platform encoding: UTF-8
- Default locale is
en
, otherwise your build will fail if you are in a Spanish OS installation. That is because some XPECT tests need a locale validation message. - We are telling maven not to use mirrors, because when using archived p2 repositories, a NullPointerException is thrown during build.
Since 1.9.1 version, to add a reference to the wollok-language, link .wlk
files and access to sanity tests, you must do this:
./wollokInstall.sh # Linux
wollokInstall.bat # Windows
This will create a subfolder wollok-language
inside your wollok file system.
+ wollok
+ org.uqbar.project.wollok
+ org.uqbar.project.wollok.lib
+ link to lang.wlk
+ link to game.wlk
+ ... etc ...
+ wollok-language
+ src
+ test
+ sanity
+ (subfolders with a lot of .wtest files)
You don't have to do anything else, it'll work. If you want to make changes to sanity tests or .wlk core libraries, you'll have to push in the corresponding repository. Wollok Xtext will link .wlk files to reflect core library changes into Runtime Application and future releases.
Then run perform a maven build to run all the tests and make sure it all runs fine:
cd org.uqbar.project.wollok.releng/
mvn clean install
You need to have an internet connection for the build, since maven tycho plugins required this :(
After you have built it with maven you can import all the projects into eclipse by using the "Import existing Maven project" option and selecting all the projects in the repository.
There will be a couple (3?) of pom files with errors similar to "Plugin Execution not covered...". That's because you need to install some extensions (connectors) to eclipse's maven plugin. Hit CTRL+1 or right-click and select "Discover m2e connectors". Then select it and install it. You need to do this for:
- Tycho,
- buildhelper, etc.
Don't worry if errors appear, they will be corrected next step.
- Close Eclipse
- Add following line to eclipse.ini of your Eclipse installation:
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms1024m
-Xmx1768m
-Declipse.p2.max.threads=10
Configuration -Declipse.p2.mirrors=false
is no longer required.
- Open Eclipse again
If you are in a spanish OS installation, in Eclipse, you could alternatively set the VM arguments. To this aim, go to Preferences -> Java -> Installed JRE
, then select the JRE in which the tests are to be run, "Edit" and in the pop-up window, fill the "Default VM Arguments" field.
-Duser.language=en -Duser.country=US -Dnl=
If you are in a Windows installation, please go to Window > Preferences > Find "encoding" and set all configs to UTF-8.
Window > Preferences > Find "target" and set "Target Platform" to definition in org.uqbar.project.wollok.targetplatform
If there are errors in this target platform definition, you should Edit it, and then Reload it (you must have Internet connection).
Open Window > Preferences
menu, search for "Discouraged" and set Discouraged reference
to Ignore
(third option from Deprecated and Restricted API
, in Eclipse 2019-xx you have a search input)
Also set to ignore Unexported package
to avoid confusing warnings:
Run all JUNIt tests from eclipse by right-clicking the "org.uqbar.project.wollok.test" project.
If your machine is in a different locale/language than english, then some tests will fail, since they expect english messages. To fix that configure the Run Configuration for the test adding the following JVM arguments
-Duser.language=en -Duser.country=US -Dnl=
If you want to test Wollok environment from a User point of view, go to org.uqbar.project.wollok.ui, open plugin.xml file and in Overview Tab (first of all) > Launch an Eclipse application (or Launch an Eclipse application in Debug mode). This opens a new environment in User mode.