Page MenuHomeDevCentral

Consider to create a monorepo for Keruald
Open, NormalPublic

Description

This week-end, refactoring Zed code, I've edited in //:

During that experience, at one moment rKHEALTH wanted rKOT 0.x.y but I was also using rKREPORT, which wanted rKOT 0.x'.y'. And I was providing for all dev-main, to be able to have a symlink in Composer for them.

That's an awful experience to need to work with tightly coupled libraries. Order of commits also matters (first rKOT, then tag and bump version, then implement in other lib).

Those problems COULD PERHAPS be solved in a monorepo.

That could also bring the benefit of avoiding issues with repo setup.

Plan

  1. Rename legacy keruald/keruald into a kerual/oldcore on GitHub (hmmm we've also this repo here under rK), that one isn't interesting anymore.
  2. DevCentral Diffusion: Create rK as a monorepo. Tomono can help for that.
  3. DevCentral Diffusion: Block push to other repos. Switch from hosted to observe from a server which will do the split.
  4. Use split.sh, git-subsplit or monorepo-builder to create split subtrees automatically (through a Jenkins CD job?)
  5. Setup CI on Jenkins with a Jenkinsfile.

Revert plan

If we don't like this experiment:

  • Jenkins CI: transform the pipeline into a template to create one pipeline per repo
  • Jenkins CD: delete, as we won't need to split anymore
  • DevCentral Diffusion: revert to normal hosted repo, with GitHub as mirror, then archive the monorepo

First candidates

All the ones above + rKCMD and the future splits from Zed: keruald/session, keruald/smartline, keruald/l10n

Event Timeline

dereckson triaged this task as Normal priority.Feb 15 2022, 01:20
dereckson created this task.

Issue with rKHEALTH: we don't support empty repo for the moment.

Issue with rKGF: still using master branch

Issue with rKREPORT: @DorianWinty works on it, using the manyrepo, we'll need to import them (see below)

Import from a manyrepo

Should be the same process than before, run _utils/import-commits-from-polyrepos.sh, or for only one:

$ export REPO=report
$ git fetch $REPO
$ git merge --strategy recursive --strategy-option subtree=$REPO/ $REPO/main

Test phase - implementation notes

rKERUALD has been created with a monorepo imported using https://github.com/hraban/tomono. I've submitted upstream a patch to avoid to hardcode bash path.

rK has been archived and renamed into keruald-legacy-core-libraries.

We can use in // the monorepo and the polyrepo and cross-import commits.

To avoid to raise audit for imported code, while the other repositories aren't switched in read-only mode, rKERUALD is tagged Not audited repository.

This comment was removed by dereckson.

Added Not audited repository tag to the relevant repositories, so we can push to them without being blocked by H29.