-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test on Nixpkgs #163
Comments
Currently, that script pushes against some branch in my personal fork. Which is obviously not a permanent solution. My proposal would be to maybe just print the diff in the CI log instead of actually pushing the commits somewhere. The alternative would be to have the script create and manage branches automatically for all PRs. Not sure how feasible that is. |
The script already handles that pretty well! It uses the The one thing that needs to be improved is integration with PRs. It doesn't let the PR know about the branch that is being managed. It also doesn't remove the branch after it's done. |
Experimenting a bit with a separate NixOS organisation. Just linking this for future reference |
Note: We should run it with Should furthermore check that |
(discussed in the team meeting today:)
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/formatting-team-meeting-2024-03-19/41845/1 |
@infinisil: Great effort and very good the sooner that gets finished. Is there a way we can help?
For a PR
I certainly think I miss something, given the vast amount of done work already. 🤣 |
We don't want CI for Nixpkgs, but rather for nixfmt, such that any PR to nixfmt gives you a diff of how the formatting changes in Nixpkgs. (discussed in the team meeting today) I just realised that we can get rid of most of the complexity of the sync-pr.sh script, since we don't really care about incremental diffs between individual commits in a single PR. Having a single diff for the entire PR is good enough.
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/formatting-team-meeting-2024-04-02/42658/1 |
Actually, having a per-commit diff was really valuable to me, especially during development. I regularly do incremental changes and see if they change the output for example |
@piegamesde I think that would be better done locally for faster feedback, this way you also don't need to wait for CI (though you'll also have to let your own machine churn). I'd say CI for PRs needs to be primarily for others to see/verify the changes on a large scale, which doesn't need to be per-diff, especially with smaller PRs. |
I'm now working on this. It turns out that it's not easily possible to create a custom link in the status checks, seems like one needs a GitHub App for that. And considering that, there's really no downside to doing the full |
Now done with #186 :) |
Every PR should report how it influenced the formatting of Nixpkgs.
We have a working script for this in https://github.com/piegamesde/nixfmt/blob/master/.github/workflows/main.yml / https://github.com/piegamesde/nixfmt/blob/master/sync-pr.sh
The text was updated successfully, but these errors were encountered: