switch block-style to line-style comments#770
Merged
Conversation
Contributor
|
As I said in chat, I'm in favor of virtually any change that cuts 1200 lines with no change in functionality. |
7edbf9c to
11679bc
Compare
davepacheco
added a commit
that referenced
this pull request
Mar 16, 2022
davepacheco
added a commit
that referenced
this pull request
Mar 16, 2022
Collaborator
Author
|
I ran into more trouble than I expected when merging. Here's what I'd suggest if you have outstanding Omicron PRs:
For the record: there are two commits to I had enabled "auto-merge" on this PR, and the checks completed around the time of ea35b6e. The UI reported that it was "attempting to auto-merge" for about 10 minutes before I gave up, disabled auto-merge, and hit "squash and merge" myself. It appears that the automerge had been successful, the UI didn't know that, and so it merged it again. 8a26d69 contains no changes. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(Disclaimer: this might be a bad idea or a bad time to do this. This experiment has taken about 5 minutes -- it's easy to throw out or try again later.)
Omicron currently has a mix of commenting styles -- both block style (C style,
/* ... */) and line style (// ...). It seems like this has been a distraction for folks, and the line style is more popular, so I figured I'd try using rustfmt's [fraughtly-named]normalize_commentsoption to switch everything to line style. I've only barely spot-checked the results but it looks okay. I'll look a little closer if folks are on board with this.If we decide to do this, I don't think we should enforce it with rustfmt because that requires an unstable option. We know what a pain that is with rustfmt. I don't expect this to be a big problem because I think line style tends to be the more common expectation.
If we decide to do this, it might be an annoying merge for anybody with outstanding work. Probably the best option would be to apply what I've done, which is:
followed by
cargo +nightly fmt. Do this before merging with this change and I'd expect the merge to be a no-op. I haven't tested this.