Skip to content

Tracking issue for merging the cranelift and wasmtime repositories #1185

@alexcrichton

Description

@alexcrichton

Discussed at yesterday's meeting I wanted to open an issue tracking progress for merging the wasmtime/cranelift repositories. I think there are three major work items that need to happen:

Performing the actual merge

There's a few different ways to do the merge here, but I'd like to propose that the following steps are done.

  • Run git filter-branch --tree-filter $HOME/rewrite-cranelift.sh HEAD in the cranelift repository on the commit we want to merge in. The script looks like this.
  • Next create a merge commit with the wasmtime head commit and this new commit. The state at this point would look like https://github.com/alexcrichton/wasmtime/tree/cranelift-merge
    • This needs the --allow-unrelated-histories flag
  • Next do a bunch of manual work including:
    • Merge CI systems
    • Tidy up readmes/top-level markdowns/licenses/etc
    • Tidy up workspaces so there's only one
    • Update various scripts for testing
    • You can see a preview of this work and what all got merged/moved

If folks have workflows though that go beyond cargo test and want to make sure any scripts and such keep working, let me know! I'll try to make sure they work in the new repository.

Transferring open issues

This will involve creating a script to migrate all open issues from the bytecodealliance/cranelift repository to bytecodealliance/wasmtime.

I think the general guidelines for this will be:

  • Audit wasmtime labels to ensure that they contain all relevant cranelift labels. We should have a mapping from all cranelift labels to wasmtime labels.
  • Use GitHub's transfer issue feature to transfer all issues, using the above label mapping, to transfer issues to the wasmtime repository.

script: https://gist.github.com/alexcrichton/ef102cb315e548c92fd671c198da9aa2

Making it easier to migrate open PRs

I've created a script which should ideally make it easy to transfer PRs from one repository to another. The general gist of that script is something like this:

  • We'll pick a commit to merge cranelift into wasmtime. We'll push two commits into this cranelift repository at that time: before-merge and after-move. The before-merge commit is the one we decided to merge into wasmtime. The after-move commit is a single extra commit with the rewrite script from the first step applied.
  • You'll check out your local branch and run the provided script here, that will do the following...
  • First it will fetch cranelift remote information
  • Next it will rebase on before-merge, to make sure your PR is up-to-date. You may want to do this manually first.
  • Next it rebase onto the after-move commit. Git should automatically detect all your renamed files, and everything should get moved around automatically.
  • Next it'll fetch wasmtime's information (currently my own temporary repository and temporary branch)
  • Finally it'll cherry-pick your changes, which are changes at the right paths, onto the wasmtime repository.

At that point you should have a local git commit you can push up to your wasmtime fork and send as a PR. We'll need to, however, close PRs as they're reopened on wasmtime.

Once this all actually happens I can drop a comment on each PR with precise instructions with an updated script that has all the variables sorted out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    craneliftIssues related to the Cranelift code generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions