|Cabal - people who can release moose||
These people are the ones who have co-maint on Moose itself and can create a
release. Theyre listed under CABAL in Moose in the Moose documentation. They
are responsible for reviewing branches, and are the only people who are
allowed to push to stable branches.
Cabal members are listed in Moose and can often be found on irc in the <irc://irc.perl.org/#moose-dev> channel.
|Contributors - people creating a topic or branch||You!|
Moose already has a fairly large feature set, and we are currently <B>notB> looking to add any major new features to it. If you have an idea for a new feature in Moose, you are encouraged to create a MooseX module first.
At this stage, no new features will even be considered for addition into the core without first being vetted as a MooseX module, unless it is absolutely 100% impossible to implement the feature outside the core.
If you think it is 100% impossible, please come discuss it with us on IRC or via e-mail. Your feature may need a small hook in the core, or a refactoring of some core modules, and we are definitely open to that.
Moose was built from the ground up with the idea of being highly extensible, and quite often the feature requests we see can be implemented through small extensions. Try it, its much easier than you might think.
The repository is divided into several branches to make maintenance easier for everyone involved. The branches below are ordered by level of stability.
Larger, longer term branches can also be created in the root namespace (i.e. at the same level as master and stable). This may be appropriate if multiple people are intending to work on the branch. These branches should not be rebased without checking with other developers first.
stable/* The branch from which releases are cut. When making a new major release, the release manager makes a new stable/X.YY branch at the current position of master. The version used in the stable branch should not include the last two digits of the version number.
For minor releases, patches will be committed to master, and backported (cherry-picked) to the appropriate stable branch as needed. A stable branch is only updated by someone from the Cabal during a release.
master The main development branch. All new code should be written against this branch. This branch contains code that has been reviewed, and will be included in the next major release. Commits which are judged to not break backwards compatibility may be backported into stable to be included in the next minor release. topic/* Small personal branches that are still in progress. They can be freely rebased. They contain targeted features that may span a handful of commits. Any change or bugfix should be created in a topic branch. rfc/* Topic branches that are completed and waiting on review. A Cabal member will look over branches in this namespace, and either merge them to master if they are acceptable, or move them back to a different namespace otherwise. This namespace is being phased out now that we are using GitHubs pull requests in our Development Workflow. attic/* Branches which have been reviewed, and rejected. They remain in the repository in case we later change our mind, or in case parts of them are still useful. abandoned/* Topic branches which have had no activity for a long period of time will be moved here, to keep the main areas clean.
So, youve cloned the main Moose repository to your local machine (see Get the Code) and youre ready to do some hacking. We couldnt be happier to welcome you to our community!
Of course, to ensure that your first experience is as productive and satisfying as possible, you should probably take some time to read over this entire POD document. Doing so will give you a full understanding of how Moose developers and maintainers work together and what they expect from one another. Done? Great!
Next, assuming you have a GitHub account, go to <http://github.com/moose/Moose> and fork the repository (see <https://help.github.com/articles/fork-a-repo>). This will put an exact replica of the Moose repository into your GitHub account, which will serve as a place to publish your patches for the Moose maintainers to review and incorporate.
Once your fork has been created, switch to your local working repository directory and update your origin remotes push URL. This allows you to use a single remote (origin) to both pull in the latest code from GitHub and also push your work to your own fork:
# Replace YOUR_USERNAME below with your GitHub username git remote set-url --push origin firstname.lastname@example.org:YOUR_USERNAME/moose.git
You can verify your work:
The general gist of the <B>STANDARD WORKFLOWB> is:
What follows is a more detailed rundown of that workflow. Please make sure to review and follow the steps in the previous section, Getting Started, if you have not done so already.
1. Update your local repository with the latest commits from the official repository 2. Create a new topic branch, based on the master branch 3. Hack away 4. Commit and push the topic branch to your forked repository 5. Submit a pull request through GitHub for that branch
Update Your Repository
Update your local copy of the master branch from the remote:
git checkout master git pull --rebase
Create Your Topic Branch
Now, create a new topic branch based on your master branch. Its useful to use concise, descriptive branch names such as: pod-syntax-contrib, feat-autodelegation, patch-23-role-comp, etc. However, well just call ours my-feature for demonstration purposes:
git checkout -b topic/my-feature
Hack. Commit. Repeat.
While youre hacking, the most important thing to remember is that your topic branch is yours to do with as you like. Nothing you do there will affect anyone else at this point. Commit as often as little or as often as you need to and dont let perfection get in the way of progress. However, dont try to do too much as the easiest changes to integrate are small and focused.
If its been a while since you created your topic branch, its often a good idea to periodically rebase your branch off of the upstream master to reduce your work later on:
git fetch # or, git remote update git rebase origin/master # or, git pull --rebase origin master
You should also feel free to publish (using push --force if necessary) your branch to your GitHub fork if you simply need feedback from others. (Note: actual collaboration takes a bit more finesse and a lot less --force however).
Clean Up Your Branch
Finally, when your development is done, its time to prepare your branch for review. Even the smallest branches can often use a little bit of tidying up before they are unleashed on a reviewer. Clarifying/cleaning up commit messages, reordering commits, splitting large commits or those which contain different types of changes, squashing related or straggler commits are all <B>highlyB> worthwhile activities to undertake on your topic branch.
<B>Remember:B> Your topic branch is yours. Dont worry about rewriting its history or breaking fast-forward. Some useful commands are listed below but please make sure that you understand what they do as they can rewrite history:
- git commit --amend - git rebase --interactive - git cherry-pick
Ultimately, your goal in cleaning up your branch is to craft a set of commits whose content and messages are as focused and understandable as possible. Doing so will greatly increase the chances of a speedy review and acceptance into the mainline development.
Rebase on the Latest
Before your final push and issuing a pull request, you need to ensure that your changes can be easily merged into the master branch of the upstream repository. This is done by once again rebasing your branch on the latest origin/master.
git fetch # or, git remote update git rebase origin/master # or, git pull --rebase origin master
Publish and Pull Request
Now its time to make your final push of the branch to your fork. The --force flag is only necessary if youve pushed before and subsequently rewriting your history:
git push --force
After your branch is published, you can issue a pull request to the Moose Cabal. See <https://help.github.com/articles/using-pull-requests> for details.
Congratulations! Youre now a contributor!
Moose is an open project but it is also an increasingly important one. Many modules depend on Moose being stable. Therefore, we have a basic set of criteria for reviewing and merging branches. What follows is a set of rough guidelines that ensures all new code is properly vetted before it is merged to the master branch.
Small bug fixes, doc patches and additional passing tests. These items dont really require approval beyond one of the core contributors just doing a simple review. For especially simple patches (doc patches especially), committing directly to master is fine. Larger bug fixes, doc additions and TODO or failing tests. Larger bug fixes should be reviewed by at least one cabal member and should be tested using the xt/author/test-my-dependents.t test.
New documentation is always welcome, but should also be reviewed by a cabal member for accuracy.
TODO tests are basically feature requests, see our New Features section for more information on that. If your feature needs core support, create a topic/ branch using the Development Workflow and start hacking away.
Failing tests are basically bug reports. You should find a core contributor and/or cabal member to see if it is a real bug, then submit the bug and your test to the RT queue. Source control is not a bug reporting tool.
New user-facing features. Anything that creates a new user-visible feature needs to be approved by <B>more than oneB> cabal member. New internals features. New features for Moose internals are less restrictive than user facing features, but still require approval by <B>at least oneB> cabal member.
Ideally you will have run the xt/author/test-my-dependents.t script to be sure you are not breaking any MooseX module or causing any other unforeseen havoc. If you do this (rather than make us do it), it will only help to hasten your branchs approval.
Backwards incompatible changes. Anything that breaks backwards compatibility must be discussed by the cabal. Backwards incompatible changes should not be merged to master if there are strong objections from any cabal members.
We have a policy for what we see as sane BACKWARDS COMPATIBILITY for Moose. If your changes break back-compat, you must be ready to discuss and defend your change.
# major releases (including trial releases) git checkout master # minor releases git checkout stable/X.YY # do final changelogging, etc vim dist.ini # increment version number git commit dzil release # or dzil release --trial for trial releases git commit # to add the actual release date git branch stable/X.YY # only for non-trial major releases
Moose uses Dist::Zilla to manage releases. Although the git repository comes with a Makefile.PL, it is a very basic one just to allow the basic perl Makefile.PL && make && make test cycle to work. In particular, it doesnt include any release metadata, such as dependencies. In order to get started with Dist::Zilla, first install it: cpanm Dist::Zilla, and then install the plugins necessary for reading the dist.ini: dzil authordeps | cpanm.
Moose releases fall into two categories, each with their own level of release preparation. A minor release is one which does not include any API changes, deprecations, and so on. In that case, it is sufficient to simply test the release candidate against a few different Perls. Testing should be done against at least two recent major versions of Perl (5.8.8 and 5.10.1, for example). If you have more versions available, you are encouraged to test them all. However, we do not put a lot of effort into supporting older 5.8.x releases.
For major releases which include an API change or deprecation, you should run the xt/author/test-my-dependents.t test. This tests a long list of MooseX and other Moose-using modules from CPAN. In order to run this script, you must arrange to have the new version of Moose in Perls include path. You can use prove -b and prove -I, install the module, or fiddle with the PERL5LIB environment variable, whatever makes you happy.
This test downloads each module from CPAN, runs its tests, and logs failures and warnings to a set of files named test-mydeps-$$-*.log. If there are failures or warnings, please work with the authors of the modules in question to fix them. If the module author simply isnt available or does not want to fix the bug, it is okay to make a release.
Regardless of whether or not a new module is available, any breakages should be noted in the conflicts list in the distributions dist.ini.
The stable branch exists for easily making bug fix releases.
git remote update git checkout -b topic/my-emergency-fix origin/master # hack git commit
Then a cabal member merges into master, and backports the change into stable/X.YY:
git checkout master git merge topic/my-emergency-fix git push git checkout stable/X.YY git cherry-pick -x master git push # release
For longer lasting branches, we use a subversion style branch layout, where master is routinely merged into the branch. Rebasing is allowed as long as all the branch contributors are using git pull --rebase properly.
commit --amend, rebase --interactive, etc. are not allowed, and should only be done in topic branches. Committing to master is still done with the same review process as a topic branch, and the branch must merge as a fast forward.
This is pretty much the way were doing branches for large-ish things right now.
Obviously there is no technical limitation on the number of branches. You can freely create topic branches off of project branches, or sub projects inside larger projects freely. Such branches should incorporate the name of the branch they were made off so that people dont accidentally assume they should be merged into master:
git checkout -b my-project--topic/foo my-project
(unfortunately Git will not allow my-project/foo as a branch name if my-project is a valid ref).
Merged branches should be deleted.
Failed branches may be kept, but should be moved to attic/ to differentiate them from in-progress topic branches.
Branches that have not been worked on for a long time will be moved to abandoned/ periodically, but feel free to move the branch back to topic/ if you want to start working on it again.
If you write any code for Moose, you <B>mustB> add tests for that code. If you do not write tests then we cannot guarantee your change will not be removed or altered at a later date, as there is nothing to confirm this is desired behavior.
If your code change/addition is deep within the bowels of Moose and your test exercises this feature in a non-obvious way, please add some comments either near the code in question or in the test so that others know.
We also greatly appreciate documentation to go with your changes, and an entry in the Changes file. Make sure to give yourself credit! Major changes or new user-facing features should also be documented in Moose::Manual::Delta.
Any user-facing changes must be accompanied by documentation. If youre not comfortable writing docs yourself, you might be able to convince another Moose dev to help you.
Our goal is to make sure that all features are documented. Undocumented features are not considered part of the API when it comes to determining whether a change is backwards compatible.
Change is inevitable, and Moose is not immune to this. We do our best to maintain backwards compatibility, but we do not want the code base to become overburdened by this. This is not to say that we will be frivolous with our changes, quite the opposite, just that we are not afraid of change and will do our best to keep it as painless as possible for the end user.
Our policy for handling backwards compatibility is documented in more detail in Moose::Manual::Support.
o Stevan Little <email@example.com> o Dave Rolsky <firstname.lastname@example.org> o Jesse Luehrs <email@example.com> o Shawn M Moore <firstname.lastname@example.org> o XXXX XXXXX (Yuval Kogman) <email@example.com> o Karen Etheridge <firstname.lastname@example.org> o Florian Ragwitz <email@example.com> o Hans Dieter Pearcey <firstname.lastname@example.org> o Chris Prather <email@example.com> o Matt S Trout <firstname.lastname@example.org>
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|perl v5.20.3||MOOSE::MANUAL::CONTRIBUTING (3)||2016-02-16|