We created loopback-labs
monorepo to facilitate development of experimental
features without interfering with loopback-next
.
loopback-labs
is a logical fork
of loopback-next
as github does not allow
us to folk loopback-next
into the same organization (strongloop
).
We divide responsibilities of the two repositories as follows:
-
loopback-next
: the repository to develop and release production-ready features. -
loopback-labs
: the repository to develop and release experimental features.
Two-way interactions can happen between loopback-labs
and loopback-next
.
-
Keep
loopback-labs
in sync withloopback-next
for production-ready features by rebasing againstloopback-next@master
. -
Graduate experimental features from
loopback-labs
intoloopback-next
.
- Set up local git repository for
loopback-labs
git clone [email protected]:strongloop/loopback-labs.git
cd loopback-labs
git remote add next [email protected]:strongloop/loopback-next.git
- Work on an experimental feature
It follows the same process and flow as loopback-next
:
- Create a feature branch
- Make changes in the feature branch
- Submit a PR against
loopback-labs@master
Please make sure changes to production packages
- Pull in changes from
loopback-next@master
cd loopback-labs
git checkout master
git fetch --all
git rebase next/master
git push --force-with-lease
- Rebase the experimental feature branch against master
cd loopback-labs
git checkout experimental/feature-1
git fetch --all
git rebase origin/master
git push --force-with-lease
- Set up local git repository for
loopback-next
cd loopback-next
git remote add labs [email protected]:strongloop/loopback-labs.git
- Pull in the experimental feature from
loopback-labs
intoloopback-next
cd loopback-next
git checkout -b experimental/feature-1
git fetch --all
// check-pick commits from `labs` into `experimental/feature-1` branch
// Move experimental modules from `experimental` to `packages`
// Create a PR
- Do we merge experimental features into
loopback-labs@master
or keep each of them isolated inloopback-labs@labs/<my-experimental-feature>
branch?
To keep an experimental feature fully isolated and make it easy to graduate into
loopback-next
, we should consider the following branching strategy illustrated
by an experimental feature named socketio
.
- Create an integration branch for SocketIO:
git checkout -b labs/socketio
- Create a development branch for SocketIO:
git checkout -b experimental/socketio
-
Start to commit code into
experimental/socketio
-
Submit a PR against
labs/socketio
-
Merge the PR from
experimental/socketio
intolabs/socketio
-
Graduate
socketio
intoloopback-next
:
cd loopback-next
git checkout -b feature/sockeio
git fetch --all
git rebase labs/labs/socketio
git push