Proposal
Formal rules governing CVS commits to the openacs.org code repository, including .LRN and contributed modules.
CVS committers are trusted to make direct changes to the code base for OpenACS and its packages.
- Which branch to use
- For core packages, new features should always be committed on HEAD, not to release branches.
- For core packages, bug fixes should be committed on the current release branch whenever applicable.
- For non-core packages, developers should work on a checkout of the release branch of the lastest release. For example, if OpenACS 5.1.0 is released, developers should work on the oacs-5-1 branch. When oacs-5-2 is branched, developers should continue working on oacs-5-1 until OpenACS 5.2.0 is actually released.
- The current release branch is merged back to HEAD after each dot release.
- New packages should be created in the /packages directory and the maturity flag should be set to zero. (This is a change from previous policy, where new packages went to /contrib/packages)
- Code
- Only GPL code and material should be committed to the openacs.org CVS repository
- Code should only be reformatted when functionality is changed, e.g. when you change control flow and reindent to reflect it.
- Database upgrade scripts should only span one release increment, and should follow Naming Database Upgrade Scripts.
- Database upgrade scripts should never go to the release version, e.g., should always have a letter suffix such as d1 or b1.
- CVS commit messages should be intelligible in the context of Changelogs. They should not refer to the files or versions.
- CVS commit messages and code comments should refer to bug, tip, or patch number if appropriate, in the format
"resolves bug 11", "resolves bugs 11, resolves bug 22". "implements tip 42", "implements tip 42, implements tip 50", "applies patch 456 by User Name", "applies patch 456 by User Name, applies patch 523 by ..."
.
- When to TIP
- A proposed change must be approved by TIP if
- It changes the core data model, or
- It will change the behavior of any core package in a way that affects existing code (typically, by changing public API), or
- It is a non-backwards-compatible change to any core or standard package.
- A proposed change need not be TIPped if
- it adds a new function to a core package in a way that:
- does not change the backwards-compatibility of public API functions.
- does not change the data model
- has no negative impact on performance
- or it changes private API.
- or it is a change to a non-core, non-standard package
- Tags
- When a package is released in final form, the developer shall tag it "packagename-x-y-z-final" and "oacs-x-y-compat". x-y should correspond to the current branch. If the package is compatible with several different core versions, several compat tags should be applied.
- When OpenACS core is released, the openacs-x-y-z-final tag shall be applied to all compat packages.
For example, adding a new API function wouldn't require a TIP. Changing an existing API function by adding an optional new flag which defaults to no-effect wouldn't require a TIP. Added a new mandatory flag to an existing function would require a TIP.
Reasons
We don't currently have clear standards for committing code.
Rule 1.3: First, this ensures that developers are working against stable core code. Second, it ensures that new package releases are available to OpenACS users immediately.
Rule 3.4: If an upgrade script ends with the final release number, then if a problem is found in a release candidate it cannot be addressed with another upgrade script. E.g., the last planned upgrade script for a package previously in dev 1 would be upgrade-2.0.0d1-2.0.0b1.sql, not upgrade-2.0.0d1-2.0.0.sql. Note that using rc1 instead of b1 would be nice, because that's the convention with release codes in cvs, but the package manager doesn't support rc tags.
Rule 5.1:
Reason 1: The packagename tag is a permanent, static tag that allows for future comparison. The compat tag is a floating tag which is used by the repository generator to determine the most recent released version of each package for each core version. This allows package developers to publish their releases to all users of automatic upgrade without any intervention from the OpenACS release team.
Reason 2: The compat tags allows CVS users to identify packages which have been released since the last core release.
Reason 3: The compat tag or something similar is required to make Rule 6 possible.
Rule 5.2: This allows OpenACS developers who are creating extensively customized sites to branch from a tag which is stable, corresponds to released code instead of development code, and applies to all packages. This tag can be used to fork packages as needed, and provides a common ancestor between the fork and the OpenACS code so that patches can be generated.
Disadvantages
Having guidelines implies enforcement. Hopefully the committers will be self-enforcing.
Implementation
The rules take effect upon approval. All technical support required already exists except for Package Maturity, which will be in OpenACS 5.2.
Edited after initial publication to reflect Jeff's clarifications of comment formatting; I also made the formatting a bit more verbose for more reliable parsing
Edited to reflect changes from TIP #70.