You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a more future-proof solution, we should consider implementing a partial formatter mode, which can be told to format only specific line ranges of a file. This way we can extend the conflict-avoiding trick to format all line ranges that aren't touched by recent PRs.
The alternative of just ripping the band-aid off and formatting all files at some point also works, and would be much simpler at the expense of more conflicts. But especially as we change the formatter again over time we'll run into the same problem over and over again, whereas the line range conflict-avoiding trick would enable a smooth mode of operation that almost never causes any churn for other users.
The text was updated successfully, but these errors were encountered:
Nixfmt works by pretty-printing parsed AST nodes. How should it deal with partial nodes, especially at the line boundaries? Also, how does it know the base indentation to use? It could calculate that from the global AST but it may differ from the unformatted parts
The context for this is here.
For a more future-proof solution, we should consider implementing a partial formatter mode, which can be told to format only specific line ranges of a file. This way we can extend the conflict-avoiding trick to format all line ranges that aren't touched by recent PRs.
The alternative of just ripping the band-aid off and formatting all files at some point also works, and would be much simpler at the expense of more conflicts. But especially as we change the formatter again over time we'll run into the same problem over and over again, whereas the line range conflict-avoiding trick would enable a smooth mode of operation that almost never causes any churn for other users.
The text was updated successfully, but these errors were encountered: