-
Notifications
You must be signed in to change notification settings - Fork 16
Development
Wollok is being developed on top of XText stack. So, if you are not familiar with it, maybe it would be a good start to take a look at the following links:
- Xtext Documentation
- Xtext Notes Written by the Chair (spanish)
- Xtext Notes Written by the Chair (english)
- Xtext in 5 minutes
We use standard open source practices with github.
We are using Github projects to handle the issues. To look for an issue to fix, the best thing is looking at the Ready to develop category (avoid the column Rainy day fund / Discuss
).
If you don't have access to the repository then
- Fork the repository
- Create a feature branch for you to work with a descriptive name.
- Commit changes and push the new branch to your repo. You may solve feature in Wollok or with native code
- Then you should add some tests.
- Once you think it is ok and passes all the tests then create a Pull Request (PR) to integrate that branch against our repository's dev branch.
- Ask for a reviewer!
- Take another issue and start again!!!
... or ask for permissions to [email protected]
If you have access to our repository then
- Same as above but without the need to fork the repository.
- Put the Issue "in progress" and assign it to you, and also set the milestone to the future release.
- Still use feature branches with PR.
- Once you have created the PR, move the issue to "To Check"
In both cases it is important to refer to the issue in a single commit, and also in the PR, using
#number_of_github_issue
. For example: fix-#1013-removing-elements-of-collection-during-iteration. This will relate the github issue with the corresponding commit and PR, fostering traceability.
Since 2020 (Wollok 2.0 I), we have new architecture:
This repo contains the Xtext implementation of Wollok Language, which is stored in a different github repository:
-
Wollok Language contains
src
core libraries, such as lang, lib, game, etc. as well as sanity tests and examples, but is implementation-agnostic -
Wollok Xtext has the JDK + Xtext implementation of Wollok Language in
org.uqbar.project.wollok.lib
folder
You must install development environment and run either wollokInstall.sh
or wollokInstall.bat
script, which will clone recursively Wollok-Language github repository and link the core library files to org.uqbar.project.wollok.lib
. Any change you do in lang.wlk
, lib.wlk
or any core library file, will be directly linked to wollok-language
subfolder. You must take into account that you should create two separate PRs for any change involving a language change, and register that change in the CHANGELOG file.
Lets say you must add a parameter to a native method of a class in lang.wlk
. Expected tasks should be the followings, assuming we are solving issue 2140:
- Checkout
dev
branch, pull latest remote changes, create a new branchfix-#2140-adding-parameter-to-foobar
- Go to
lang.wlk
file, add parameter infoobar
class. This could be done either fromwollok-language
ororg.uqbar.project.wollok.lib
, because they are linked together, but we recommend usingwollok-language
- Go to
org.uqbar.project.wollok.lib
,src/wollok/WFoobar.xtend
class and modify native implementation - Go to
wollok-language
and change the tests according to the new expected parameter. - Run the sanity tests from Wollok Xtext (you can also run it using wollok-cli from wollok-language folder:
WOLLOK_DEV_ROOT=../ wollok test -dontValidate
) - Change any Xtext tests associated with
foobar
class - Run all the tests, they should end succesfully
- Open a PR for
wollok-language
, adding it also to the CHANGELOG file - Open a second PR for
wollok-xtext
- Link both PRs
If a change does not involve a core library file, or it involves a change for the autocomplete, formatter, validator, testing or any other component, then you should'n be aware of wollok-language functionality, resulting in less tasks:
- Checkout
dev
branch, pull latest remote changes, create a new branchfix-#2140-validate-wko
- Modify xtext classes
- Run all the tests, they should end succesfully
- Open a PR for
wollok-xtext
If a change does not involve xtext implementation, then you should create only a wollok-language PR but you should be aware of running sanity tests from Xtext or wollok-cli.
The following pages contain useful information for Wollok developers.
- Developer Environment Setup
- Developing a Wollok SDK Class: Contribute a class to the Wollok lib SDK
- Changing the Language: how to add a syntax element and change all parts of the language to intepret, check, run and test that element
- Testing: how to run wollok tests and how to write them.
- Adding a Template Proposals: how to add a template proposal (autocomplete) for a language element.
- Adding a New Static Validation: how to add a new static check/validation (warning / error)
- Adding a QuickFix that solves validation issues directly into the editor
- Adding a Plugin to the final product.
- Changing outline view of Wollok objects
- Deploying Wollok: how to build & release Wollok products in a SCM environment