-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
WIP: format rebase script #363759
Draft
infinisil
wants to merge
1
commit into
NixOS:master
Choose a base branch
from
tweag:format-rebase
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP: format rebase script #363759
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux
labels
Dec 9, 2024
infinisil
commented
Dec 10, 2024
Comment on lines
+31
to
+38
# FIXME: Problem, example with PR 363407 (60b1ab8ae23e1b15f8054e8fe4d8775bdfe26bc5) | ||
# (After resolving an irrelevant conflict), the merge with strategy theirs causes a syntax error | ||
# We need to not merge any files, but always take the entire file from the other side | ||
# Kind of something with reset or checkout maybe? | ||
# | ||
# Probably a filter-branch should work, by effectively ignoring the formatting commit, and just reapplying the formatting on all files. | ||
# The formatting commit should only be used to speed this up. In particular there might be intermediate commits that need to be formatted that haven't been formatted at all before (in that exact state) | ||
# After the filter branch, a rebase should work without problems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how to reproduce the problem (assuming you're in a Nixpkgs checkout)
git fetch git@github.com:tweag/nixpkgs.git
git checkout file_picker
git worktree add ../format-rebase format-rebase
../format-rebase/maintainers/scripts/format-rebase/run.sh treewide-pinned
Executing: /home/tweagysil/src/nixpkgs/format-rebase/maintainers/scripts/format-rebase/format-head.sh /tmp/tmp.xhoR8v9FKd/reformatted-files
Formatting pkgs/by-name/fl/fluffychat/package.nix
pkgs/by-name/fl/fluffychat/package.nix:12:3:
|
12 | targetFlutterPlatform ? "linux",
| ^
unexpected 't'
expecting expression
warning: execution failed: /home/tweagysil/src/nixpkgs/format-rebase/maintainers/scripts/format-rebase/format-head.sh /tmp/tmp.xhoR8v9FKd/reformatted-files
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-formatting-team-treewide-nixpkgs-formatting/56666/12 |
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
10.rebuild-darwin: 0
This PR does not cause any packages to rebuild on Darwin
10.rebuild-linux: 0
This PR does not cause any packages to rebuild on Linux
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivated by NixOS/nixfmt#159 and the treewide Nixpkgs reformatting. Doesn't fully work though, see FIXME.
Ping @NixOS/nix-formatting
Things done
This work is funded by Tweag and Antithesis ✨
Add a 👍 reaction to pull requests you find important.