scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.88k stars 1.06k forks source link

Automation of syncing community build repos #11315

Open prolativ opened 3 years ago

prolativ commented 3 years ago

@romanowski came up with an idea how to reduce the burden of maintaining the community build. Currently when some changes in the compiler break the tests of a project from the community build the developer introducing the changes needs to push a fix to the fork of that project defined in the community build settings. But at some point the changes from the fork should be merged back to the upstream repo. This step could be simplified by automatically opening a PR to the upstream repo when we merge something to the fork. Then the maintainers of the upstream repo could then simply accept the PR to get the changes. @tdudzik has prepared a working solution for that but one last thing that is needed is finding the proper way of authentication for the github actions. @smarter do we happen to have a github bot account that could be used for that?

smarter commented 3 years ago

This step could be simplified by automatically opening a PR to the upstream repo when we merge something to the fork.

This will not work in general: if we change something in dotty master that requires us to change a community build project, that change might not compile on the released version of dotty that upstream is using.

@smarter do we happen to have a github bot account that could be used for that?

There's https://github.com/dotty-bot but I have no idea how to access it, maybe @liufengyun knows.

smarter commented 3 years ago

It will also not work in general because the version of the project in our community build might be too far behind the version upstream, so no automatic tool will be able to create a PR that doesn't have conflicts. IMO the first step here is to automate the other direction: the projects in our community build should be as up-to-date with upstream as possible, so when we make changes they're easy to port to master. I've mentioned before that dependabot can be used to make PRs to auto-update submodules which could help here: https://dependabot.com/submodules, the problem is that our submodules are forks of the original repo, and there's nothing that makes sure that the fork itself is auto-updated to track upstream.

prolativ commented 3 years ago

The maintainers might wait with merging the changes until a new version of the compiler gets released. If we merge to a fork multiple times the PR to upstream would get updated. Even if there are some conflicts, the maintainers will still be aware what changes will need to get introduced for the newer version of the compiler

liufengyun commented 3 years ago

Regarding the bot, I suggest creating a new bot for the purpose (at least for now). I had a discussion with @anatoliykmetyuk , we are in the process of getting hold of the account and will make it available soon.

prolativ commented 3 years ago

Ok, anyway we might try to reference the bot token as its done in other places in the CI workflow. If the old token still works, changing the token should be orthogonal to this issue