mojo
mojo copied to clipboard
[Feature Request] DX: Change the default branch of modularml/mojo from `main` to `nightly`
Review Mojo's priorities
- [X] I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
I would like a modularml admin to go to the settings of this repo and change the default branch to nightly, see https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch
What is your motivation for this change?
- Many (mostly new) contributors make the mistake of targeting main instead of nightly. This happens so many times that we even had to make a github action to check it in the CI.
- Also when reading contributing guides and such from the github UI, it makes sense that future contributors read the latest version (from nightly) than the latest stable version.
- The mojo repo in the github UI is not supposed to be accessed by non-contributors (except the readme maybe), as such, it doesn't matter which version of the code/docs appears first in the github UI
To conclude: There is very little value in keeping main
as the default branch, we could switch it to nightly.
This should lower the number of quirks to remember/learn when contributing to this repo.
Any other details?
No response
Thanks for filing this. Would love the community to +1 if this is important to other folks. The reason that the main branch is is the default right now is to support the users that download the released versions of Mojo and want to run the examples.
While this is in no way the exact list of all the PRs that have wrongfully targeted main, here is the list of PRs that target main and were not accepted after the stdlib became open source: https://github.com/modularml/mojo/pulls?q=is%3Apr+base%3Amain++is%3Aunmerged+created%3A%3E2024-03-28 . That can be used as a data point to understand the problem I'm talking about.
If we assume that https://github.com/modularml/mojo/pulls?q=is%3Apr+base%3Anightly+is%3Aclosed+created%3A%3E2024-03-28+-author%3AJoeLoser+ is the list of PR merged in nightly by the community, the number of PRs that targeted the wrong branch by the community is around ~10% of all opened PRs, which is significant.
If I may add, new contributors aren't necessarily the ones that will +1 this, because it's a mistake that contributors make once and will never make again. So it might not seem important when the contributor has learned that nightly is the right target.
Maybe there is something we can work out about the examples to still keep this workflow while still changing the main branch? If someone from the community has an idea there it would be great :)
+1 for this.
I would even prefer if the main
branch is the current nightly branch for daily development. And, the stable
branch is the current main
branch for cutting release.
The reason that the main branch is is the default right now is to support the users that download the released versions of Mojo and want to run the examples.
Is it possible to redirect link to the release branch? If they jump into the repo instead of the official site, we can direct them with README.md
Would it help if there was a cross-platform bash script or something similar with the right git instructions that did the right thing to set up fix branch locally?
Would it help if there was a cross-platform bash script or something similar with the right git instructions that did the right thing to set up fix branch locally?
I don't think the issue is here. The problem is in the github UI as mentionned in the issue description and a bash script won't change the UI.
One another minor annoyance of not having the nightly branch as the default branch is that the issue templates and pull request templates used are the ones of the default branch, meaning any change to those will only be seen at the next release
+1
For motivating examples, I'm re-listing the PRs I mentioned on Discord:
- 2912
- 2881
- 2732
- 2697
- 2676
- 2665
- 2662
- 2656
- 2490
- 2478
- 2472
- 2343
- 2309
- 2301
- 2272
- 2221
- 2178
- 2039
- 2029
- 2028
(I'm not providing links because GitHub)
All these commits initially targeted the main
branch; on retargeting the nightly
branch, a whole bunch of commits got applied to them, inflating the commit number massively.
For more motivating examples, here are all the PRs (and one issue) till now (which I could find) that suggested documentation fixes which were already applied in the nightly
branch:
- 2890
- 2881
- 2750
- 2732
- 2512
- 2516
- 2508
Since the docs site syncs with main
and not nightly
, users see a lot of outdated information and errors. They then look at the repo and see that the repo's default branch (main
) also has these errors, not realizing that they need to check nightly
instead.