Mass autoformat with class and module declarations format fix#12230
Conversation
|
This fails the formatting tests. |
Well, yes, of course. Otherwise the corresponding autoformatter change wouldn't really be a change, would it? |
Ah yes, ignore me;-) I hadn't seen that the actual changes to the formatter haven't been merged yet. |
| class PlatformVersionAvailabilitySpec extends Synth::TPlatformVersionAvailabilitySpec, | ||
| AvailabilitySpec { | ||
| AvailabilitySpec | ||
| { |
There was a problem hiding this comment.
A number of these changes are in generated files. Changes need to be made at the source (schema.py or qlgen.py???) then the files regenerated with bazel run //swift/codegen I think.
There was a problem hiding this comment.
I'm not sure that's necessary? It looks like the relevant codegen has some hook to format its output, and I guess that makes the most sense anyway - it would be brittle to rely on a code generator generating correctly formatted code, when the generator could simply run the autoformatter.
There was a problem hiding this comment.
Yeah, the codegen calls out to the autoformatter, IIRC (cc @redsun82)
d10dd87 to
7057bca
Compare
|
Should be merged once the next CLI with the auto-formatter update lands and CI goes green. |
| class DifferentiableFunctionExtractOriginalExpr extends Generated::DifferentiableFunctionExtractOriginalExpr { | ||
| } | ||
| class DifferentiableFunctionExtractOriginalExpr extends Generated::DifferentiableFunctionExtractOriginalExpr | ||
| { } |
There was a problem hiding this comment.
I don't particularly like the newline when the class body is empty, but this might be a special case that's not worth bikeshedding too much about.
|
I tried looking a bit at the "empty body gets printed on its own line" issue, but it turns out to be very tricky to fix in a nice way, because we have to account for the possibility of comments appearing within an empty body. So I'll leave it like this. |
e028f52
7057bca to
e028f52
Compare
|
@aschackmull : Looks like sync files are broken. |
e028f52 to
159d8e9
Compare
Yeah, for some reason |
I've split the changes into one commit per language.