-
Notifications
You must be signed in to change notification settings - Fork 16
Development Environment Setup
If you want to refer to Wollok based on Eclipse Neon, please refer to this historical page
- 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 rightclicking and copying the URL, be sure to uncheck "Show only the latest versions of available software" to see them)
-
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.
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"
Previously, it was required to add a
-Darguments='-Dtycho.disableP2Mirrors=true' -Dtycho.disableP2Mirrors=true
, in order to tell maven not to use mirrors: using archived p2 repositories, a NullPointerException was thrown during build. This error was fixed, so please avoid this configuration if setted because this will cause Wollok build to fail.
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 should be
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.
Since 1.9.2 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. For further instructions, please refer to development page.
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.
- 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 and it's not recommended.
- 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
It will take a long time and will change from 0% to 95% suddenly. Don't worry, it is the expected behavior.
- Open
Window > Preferences
menu, search for "Discouraged" and setDiscouraged reference
toIgnore
(third option fromDeprecated 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=
Right now, if you run all the tests, all Xpect tests will fail. You have to manually run all Xpect tests in a second step, and they will pass succesfully. We'll try to fix it but it's a hard work to do (you won't encounter this problem in Travis or AppVeyor build).
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.