Skip to content

flambda‐backend pivot‐root (2024‐10‐22)

Mark Shinwell edited this page Oct 22, 2024 · 3 revisions

What has changed?

The flambda-backend repo now looks like an upstream ocaml/ocaml repo. In particular the ocaml/ subfolder has been removed and its contents are now at the root.

This means that the upstream history is now available (through git log, git blame, etc)!

This change will make it easier to do merges from upstream and to track changes back through history.

Rebasing an existing PR across this change

You should just be able to use e.g. git rebase -i as usual for this.

There are some opportunities for conflicts, but these should be straightforward to resolve. For example if the PR deletes a file that has been moved during pivot-root, e.g. something under ocaml/testsuite/ (now moved to just testsuite), then you will get a rename/delete conflict. You can resolve this to the deletion side.

If the PR touches files in the flambda-backend-specific tests/ or testsuite/ directories (not the “normal” testsuite that used to live under ocaml/testsuite/) you might need some minor manual intervention.

Testsuite changes

The extra flambda-backend tests run by ocamltest are now in flambda-backend/testsuite/ (previously testsuite/)

The dune-based flambda-backend tests are now in flambda-backend/tests/ (previously tests/)

Changes in the backend directories

This change was merged shortly before the pivot-root change: a handful of files that we’d like to keep as descendents of upstream files (as opposed to copies that we port any upstream changes to manually) are now in asmcomp/ rather than backend/.

A few files have missing history on our side

Files that were copied from upstream into different locations in flambda-backend and then modified don’t have the full history on the flambda-backend side, although the changesets are still present in the repo.

These are:

  • The few files in asmcomp/ as above
  • Some files in driver/
  • Some files relating to the toplevel

We may add empty commits with the previous log entries in due course.

Files which we don’t build

A fair number of files that we don’t build have been removed e.g. for Closure, Flambda 1 and the majority of the upstream asmcomp/ directory. This will reduce inconvenience in fuzzy find-file operations and avoid accidental wasted time resolving conflicts or applying diffs.

Merges with upstream should be done so as to keep these files deleted.

Last pre-pivot-root revision

The last revision before this change is tagged as pre-pivot-root.