Jikes Developer FAQ Jikes


Source Control

Like many open source projects, Jikes uses CVS (Concurrent Versions System) to manage its source code. CVS allows several people to work on the same files at the same time. It allows people to make changes locally and commit them to a shared repository. Each file has an associated version number which the system uses to keep track of what's been changed as the project moves forward. Using CVS, one can compare two versions of file to see changes, compare multiple files, revert to a previous state, and retreive old releases. For more information on how CVS works, you may want to go to the CERN Web site about CVS (http://wwwinfo.cern.ch/asd/cvs/), or to the Official CVS Web site (http://cvshome.org).


Official Releases source

The most recent official release of Jikes is available at the Jikes Download Page. It's already packaged as a single downloadable file, so you don't need CVS if you will be using a released version of Jikes.


CVS Client Setup

If you want to contribute to the Jikes project, you will need the install a cvs client. The appropriate CVS Client is of course platform-dependent, and you'll find the correct resources in the topic related to your platform on the left.

Download and install the correct CVS Client for your platform:
ftp://ftp.cvshome.org/pub/ (binary or source)


Some folks run into problems using CVS on machines behind a firewall. If your firewall will not allow you to make connections to machines out on the Internet, there is nothing we can do to help you. You should talk to your system administrator about the outgoing connection policy at your site.

The CVS client on the developer machine has to be configured to connect correctly to the Jikes repository. The way of doing so may vary from one platform to another, but most of the time it's done by setting the CVSROOT environment variable:

( sh/bash syntax )
export CVSROOT=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jikes

When using the CVS client, we suggest that you save the following default options in your .cvsrc file. The .cvsrc file should be located in your home directory.

Content of .cvsrc:
cvs -q -z3
diff -uN
update -P
checkout -P
  • The -q optiion will tell CVS to be quiet and output only needed messages
  • The -z3 option will enable compression which makes downloads faster
  • The -P option for update and checkout tells the system not to checkout empty directories
  • The -uN option to diff will use the unidiff format when printing changes in files and it will include new files in the diff output. The unidiff format is required for patches to the Jikes source, it is much easier to read than the traditional diff format.


Retrieving Jikes source code

The next step is to retrieve the source code itself. The first time you get the Jikes code, you'll need to perform a 'cvs checkout' of the jikes module.

First, cd to the directory where you want the Jikes source to be stored on your filesystem. Then, checkout the modules of Jikes you are interested into (most will want jikes and jacks):

cvs checkout jikes jacks

The associated directories should now have been created: jikes and jacks in this example.

You're now ready to compile.


Jikes modules

Here's the list of Jikes modules available through CVS:

jikes the Jikes compiler source code
jiketst the old Jikes test package code (unused)
jikespg the Jikes Parser Generator source code
jikes-website  the project Web pages


Updating Jikes source code

Whenever you want to retrieve the latest modifications made to the source and update your local source tree copy, you'll need to use the 'update' command of CVS. Simply cd to the directory where you checked out the jikes source code and run 'cvs update'.

cd jikes
cvs update

The above command will contact the CVS server and download any changes that were made since your last update.


Coping with conflicts

If you made some changes to your local copy of the source tree and then updated it, a conflict arises if a commiter (a person in charge of injecting modifications into the master source repository) made a change to the same file. Most of the time CVS will take care of resolving that conflict automatically for you. But if the same portion of code was modified by you (locally) and the commiter (in the repository), CVS cannot decide which code it's supposed to keep or how to merge them: CVS reports it to you by saying that an unresolved conflict occured.

In this situation, you'll need to perform the merging action yourself. To help you in that process, CVS includes both source codes in the file itself, like this:

<<<<< file.cpp
[the code you modified locally]
[the code modified by the commiter]
>>>>> 1.23

You just have to replace these conflicting sections by the appropriate code, by hand, to resolve the conflict.


ViewCVS/WebCVS Interface

The WebCVS Interface can be a useful way to browse the contents of the Jikes CVS for those folks that are unable or unwilling to use the normal CVS client. WebCVS is a Web-based front-end on top of a CVS-enabled server, so you don't have to do a CVS client installed to use it. This interface is most handy for comparing revisions and checking to see when/if a given feature was added. SourceForge.net uses a more modern ViewCVS for the same purpose.