Zulip Chat Archive

Stream: batteries

Topic: Process for PRs depending on Lean PRs


François G. Dorais (Jan 26 2024 at 06:18):

I'm working on following up with my RFC lean4#3198. This involves making a PR to core and a dependent PR to Std (perhaps even another PR for Mathlib). This is actually my first time doing this for a long time.

I tried to keep track of the various features to facilitate this process but I was only passively reading as they were happening. Is there some documentation how to properly use bump/v4.6.0 and nightly-testing branches. Right now I'm following my nose and things are working out but I'm worried I'm doing it wrong and I might have to backtrack and do it all over again.

Marc Huisinga (Jan 26 2024 at 08:06):

There is documentation here: https://leanprover-community.github.io/contribute/tags_and_branches.html

François G. Dorais (Jan 26 2024 at 15:00):

That's exactly what I was looking for! Thanks!

François G. Dorais (Jan 26 2024 at 23:42):

I keep running into small issues. Most are due to my ignorance but some appear to be due to the fact that I'm working from a fork on lean4 and std4 rather than a branch. Pro-tips from git experts would be most welcome!

Marc Huisinga (Jan 27 2024 at 09:42):

You need to branch off from nightly-with-mathlib, not master.

Joachim Breitner (Jan 27 2024 at 09:53):

This means that your git log should show your changes, and then as the first commit that isn't yours the one labeled nightly-with-mathlib.

François G. Dorais (Jan 27 2024 at 19:34):

The issue is that my fork is only set to track the master branch from upstream. It's a serious pain to get other upstream branches.

Mauricio Collares (Jan 27 2024 at 19:49):

git fetch origin plus referring to the branch as origin/nightly-with-mathlib should work fine. Does it go wrong somehow?

François G. Dorais (Jan 27 2024 at 19:54):

I'm on a fork, origin is my fork, upstream is where the branch is. I had to go and edit .git/config to track all branches from upstream instead of just master. It took forever to figure out that was the problem!

Mauricio Collares (Jan 27 2024 at 19:55):

git fetch upstream and referring to the branch as upstream/nightly-with-mathlib is supposed to work out of the box, but glad to hear your issue is solved!

Mauricio Collares (Jan 27 2024 at 19:57):

At least when I add a new remote it says fetch = +refs/heads/*:refs/remotes/REMOTE_NAME/* in .git/config by default

Mauricio Collares (Jan 27 2024 at 19:58):

(I'm a fan of additionally having fetch = +refs/pull/*/head:refs/pullreqs/* so I can refer to branches by PR number)

François G. Dorais (Jan 27 2024 at 19:59):

That was the problem, mine was set to fetch = +refs/heads/master:refs/remotes/upstream/master for unknown reasons.

Mauricio Collares (Jan 27 2024 at 20:01):

Oh, ouch. The manpage says git remote add -t master <name> <URL> does that, I wonder what porcelain does that by default

François G. Dorais (Jan 27 2024 at 20:03):

Indeed! I created that fork a long time ago so I don't recall.

François G. Dorais (Jan 28 2024 at 07:11):

Now that my setup woes are all resolved, everything is on-track. The nightly-testing on Std doesn't work right now but I have a PR ready that builds on the most recent nightly-testing-2024-01-24. I now need write access to the branch lean-pr-testing-3223 but that can wait after nighly-testing is fixed. @Scott Morrison

Kim Morrison (Jan 28 2024 at 10:45):

Holiday still, will probably fix it on the next 24 hours!


Last updated: May 02 2025 at 03:31 UTC