Hey all wanted to follow-up here to make a topic to talk about https://github.com/bytecodealliance/cranelift/issues/1408 if necessary. I'm thinking that if it still sounds good to everyone we could shoot for pulling the trigger perhaps closer to the weekend, say this Friday, to iron out some stuff over the weekend if necessary and avoid interrupting too many workflows?
What is the top level repo going to be called? Your example looks weird with it being called wasmtime, with a cranelift repo inside of it.
the top-level repo will indeed be called Wasmtime. I agree that the naming is a bit unfortunate, but the two alternatives—inverting things and having Wasmtime under Cranelift, or having both in some generically-named repo—seem strictly worse
See also my comment in the issue for the reasoning behind the merge
I read your comment. I just wish there was another way to do it, without merging the repos. It feels like cranelift is going to be 'less' of a standalone project.
we looked at alternatives quite extensively, but unfortunately nobody has good solutions for multi-repo setups with circular dependencies.
I don't think there's a risk of Cranelift actually becoming less of a standalone project: just within the Bytecode Alliance we have multiple non-wasmtime use cases that are way too important. Perception is a different matter, I admit, so we should do what we can to make it clear that Cranelift very much has its own, independent identity.
Speaking of which, @Alex Crichton, how bad would it be to move the cranelift
directory to the top-level? I understand that it's normal for dependencies to live under crates
, but from a visibility perspective it'd be better to have it at the top-level
Yes, even a top level directory would give better perception / perspective.
I agree with this, yes. If the downsides aren't too significant, it'd be good to make this change
And people can still use a git dependency on cranelift? I'm not doing it, but I think people are
Joey Gouly said:
And people can still use a git dependency on cranelift? I'm not doing it, but I think people are
I am using a git dep on cranelift.
Yes, that still works. Here's what the cargo docs have to say on that matter:
Cargo will fetch the git repository at this location then look for a Cargo.toml for the requested crate anywhere inside the git repository (not necessarily at the root - for example, specifying a member crate name of a workspace and setting git to the repository containing the workspace).
Yes git deps will still work and top level dir is totally doable
in terms of crate organization, how do folk sfeel about a crates
dir inside of a top-level cranelift
dir? So you'd have something like cranelift/crates/codegen
? Or would y'all prefer to stick with cranelift/cranelift-codegen
(or cranelift/codegen
)?
sort of whether to carry over https://github.com/bytecodealliance/cranelift/pull/1359
@Alex Crichton so https://github.com/alexcrichton/wasmtime/tree/cranelift-merge/crates/cranelift/src
would become https://github.com/alexcrichton/wasmtime/tree/cranelift-merge/cranelift/src
, and all sub-crates of cranelift would move under cranelift/crates
, and lose the cranelift-
prefix?
if so, that seems good to me
right yeah, although we have the option of cranelift/crates/$crate
, cranelift/$crate
, or cranelift/cranelift-$crate
(I'd personally advocate for the first)
I guess the first is closest to "this really is its own thing and would in a better world be its own, normally organized, repository", so I agree that that makes sense
@Benjamin Bouvier @Dan Gohman do y'all feel ok about performing the merge today? With the final crate structure being craneflit/crates/$crate
?
or should we postpone to gather more feedback?
I prefer cranelift/$crate
.
@Alex Crichton There's one suggestion that shouldn't be too hard to implement, and maybe you've already done it: could we make sure that transferred issues are marked with a new "cranelift" label in wasmtime? with that, i don't have any objections left!
@Benjamin Bouvier certainly yeah, I was planning on tweaking the script to do that
and we'll have a bit of label-reorganization to do after the merge, but I don't think it'll be too hard
@Alex Crichton makes sense to me too.
On cranelift/$crate
vs cranelift/crates/$crate
, are we antitipating having non-crate things under cranelift/
?
Ok so in terms of logistics, I don't mind taking the afternoon today to actually do the merge. Are there opinions though on how to like "close the tree" for cranelift and such?
otherwise I can just "do the steps" and then clean up afterwards if anything was merged in the meantime
It seems ok to just announce it's happening here in Zulip, and add a comment in https://github.com/bytecodealliance/cranelift/issues/1408
mk, sounds good. As for the final crate organization, I don't really have a horse in this race, I'm happy to implement whatever
We can also mark the Cranelift repo as archived in Guthub, which makes it readonly
yeah I don't think I'll do that this afternoon since it may be a bit too soon (and we may want to work with authors on PRs), but as a long-term goal that sounds good
Yeah, it's not urgent. If people do commit stuff to Cranelift after the merge, it shouldn't be hard to move the patches over.
Ok, I'm ok either way, but I also vote for cranelift/$crate
I'm all in favor of fewer indirection levels, so cranelift/$crate
is my preferred choice too, but no strong opinions here.
thanks @Alex Crichton for doing it, either way
I've posted a PR for this to work on at https://github.com/bytecodealliance/wasmtime/pull/1019
@Chris Fallin in case you missed this ^
Thanks, Joey, yep definitely aware! Re: the arm64 side-branch, I think I'm actually going to try some git filter-branch
magic to rewrite our commits on top of the rewritten Cranelift base; this will keep us sane when we merge from upstream. (The plan is still to collapse into a stack of logical patch commits when we finally merge...)
@Chris Fallin btw the script I ended up with to rebase PRs should actually work for you I think
it'll keep the history and everything, and in theory won't require any intervention from your part as long as it rebases on master
@Alex Crichton you mean, once we get to the point that we're merging and have a PR? Or to use now to rewrite our branch? If you could share the script that would be very useful, thanks!
@Chris Fallin the interim script I was testing looks like https://gist.github.com/alexcrichton/8cb3f4ef7c25317ba6824ee31e3e53aa
although for the actual merge I'd need to tweak a few variables
do you have a branch I could poke around on to see how the script works?
@Alex Crichton our WIP branch is at repo https://github.com/cfallin/cranelift
, branch new-isa-def-2
(we should really rename that...).
Thanks, this script is a good starting point, I'm happy to play around with it!
ok cool, thanks!
I'll confirm it works as expected on that branch
@Chris Fallin ok so the updated script -- https://gist.github.com/alexcrichton/8cb3f4ef7c25317ba6824ee31e3e53aa -- has the variables configured and should work as-is
I'm realizing though it's best to execute the commands manually one-by-one
because at least for your branch there were a number of rebase things to take care of
(and a rebase failure bailed out on the script and it's not great at resuming in the middle)
I ran the script though and produced https://github.com/alexcrichton/wasmtime/tree/new-isa-def-2 which should be your branch, but rebased on top of the wasmtime merge
Fantastic, thank you for that!
Ok I think everything should be ready to go, @Dan Gohman do you want review and/or hit the merge button on https://github.com/bytecodealliance/wasmtime/pull/1019?
(would recommend making sure it's a merge and not a squash-and-merge button)
also once we do the actual merge into wasmtime I'll start the transfer of issues
and I'll comment leaving a link to https://gist.github.com/alexcrichton/8cb3f4ef7c25317ba6824ee31e3e53aa on all existing PRs
but I figure it's better to leave PRs open until authors get around to moving/closing
I'm in a video call atm, but I'll take a look as soon as I'm done
I'm in a meeting atm, but I'll take a look as soon as I'm done.
Don't multitask and Zulip at the same time, apparently.
Reviewed!
Ok I've merged now! Gonna do lots of clean up now at this point
@Dan Gohman wanna merge https://github.com/bytecodealliance/cranelift/pull/1414 to prevent future cranelift merges?
+3 −201,782
@Alex Crichton it must be sort of satisfying to delete that many lines of code
Uh oh, am I getting emailed for every open Cranelift issue?
But only the original posts, and not all the comments?
Oh, " This issue is being transferred. Timeline may not be complete until it finishes. "
Also, can someone transfer over the user permissions? @Dan Gohman?
oh uh oh
@Dan Gohman are you getting a lot of emails?
I didn't think issue transfers did emails
I am getting a notification for each issue
oh hey there's the hundreds of emails for me too
may wanna unwatch for a moment...
I can take care of permissions @Andrew Brown
Well, that's what filters are for ;-)
ok that's all issues transferred
ok permissions should be copied over
cool, looks like it worked!
ok and PRs have been commented
I tried to preserve the labels as much as possible for issues, although many imported into wasmtime now have a cranelift:
prefix
folks should feel free to edit those as they see fit though
that was just to make sure we know what's what
do we have docs on how to rebase wasmtime PRs (not cranelift PRs) for this merge?
@fitzgen (he/him) that should just be a typical git rebase
wasmtime didn't move around with this merge
cool
should branches before-merge
and after-merge
already exist?
or do we provide them to the helper script?
^ @Alex Crichton
@Andrew Brown hm the branches should already exist
https://github.com/alexcrichton/cranelift/tree/after-move and https://github.com/alexcrichton/cranelift/tree/before-merge
Maybe you should push those to bytecodealliance/cranelift? https://github.com/bytecodealliance/cranelift/branches/all
sure I can do that
or should I not have changed CRANELIFT_REMOTE to my own remote?
ok, I see; we should just use your repo and then at the end push that branch to our fork of wasmtime
it does appear I messed this up
in my repo
I'll push correct things to the cranelift repo, sorry about that
ok updated gist
and branches are in the cranelift repo
er, the bytecodealliance repo
I'll try it out
Hmm, it looks like the default build doesn't include clif-util
anymore? Was that intended?
(I haven't done very much with large trees of subcrates so I dunno if just cargo build
is insufficient)
@Chris Fallin it depends on where you build sorta, if you cargo build
inside of cranelift/
it should build it
but if you cargo build
at the root that's building the wasmtime
CLI
Ah -- root Cargo.toml
needs a tweak it seems?:
[cfallin@cfallin-laptop cranelift]$ cargo build error: current package believes it's in a workspace when it's not: current: /home/cfallin/wasmtime/cranelift/Cargo.toml workspace: /home/cfallin/wasmtime/Cargo.toml this may be fixable by adding `cranelift` to the `workspace.members` array
Hm, I'm trying out the new gist and it is having a hard time with the rename from, e.g. cranelift-codegen
to cranelift/cranelift-codegen
While we're reorganizing things, does renaming the clif-util
program to either cranelift
or clif
resonate with anyone?
:+1: for clif
actually, I change my vote: I think cranelift
makes more sense now that it is in the wasmtime
repo
@Chris Fallin oh oops, I'll fix that
@Andrew Brown what sort of issues are you having?
or got a branch I can try out?
@Chris Fallin should be fixed in https://github.com/bytecodealliance/wasmtime/pull/1190
@Andrew Brown oh if you add a brand new file it has no idea what to do with that (git)
in terms of renames that is
you'll have to manually rename new files
@Alex Crichton, I sorted it now: my branch was messed up from my previous run
once I hard-reset it to what I had on my fork, then the script works great!
ah ok nice
but yeah, new files we will have to move around before creating the new PR: https://github.com/bytecodealliance/wasmtime/pull/1191/checks?check_run_id=476064308
@Alex Crichton I get this warning now: $ cargo test -p cranelift-codegen
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /home/joey/src/wasmtime/cranelift/Cargo.toml
workspace: /home/joey/src/wasmtime/Cargo.toml
Should I be running the tests another way?
also how can I 'cargo run', to run clif-util? I tried cargo run -p cranelift and cargo run -p clif-util
@Joey Gouly you may need to rebase to get the profile thing to go away
I'm not getting that locally
I fixed an issue with that I believe
you should also be albe to run clif-util with cargo run -p cranelift-tools --bin clif-util
oh ou can drop the --bin
too
Ah thanks, got confused with the package name
I'm on @Chris Fallin's branch, so guess I'll see the warning until it's updated
FWIW the fix was pretty small an you can probably apply it locally
Ah thanks
Just a heads-up re: the merge -- it seems that there's a latent possibility of confusion. In https://github.com/bytecodealliance/wasmtime/issues/1174 just now, someone had found a link to cranelift#1174 (which was a PR) via the PR's commit message, but because of some confusing combination of redirects, ended up at wasmtime#1174, which is a completely unrelated issue. I'm not sure what can be done about this, other than to be aware...
Last updated: Nov 22 2024 at 16:03 UTC