Skip to content

v0.9.1

@stroxler stroxler tagged this 03 May 18:18
Summary:
We had inline comments (by that I mean trailing comments) for fields in
Define.Signature.t, and in a refactor the autoformatter moved our comments for
us to the next line. This is bad because comments should always go above the
code, not below, and it was actually kind of disastrous in this case because
`parent` and `nesting_define` - the very things we wanted to the comment to
clearly distinguish - are right next to each other so the comment became a lie.

Anyway, patching up the comments to be above the record fields they refer to,
and also to be consistent across the .mli file, the signature, and the struct.

It's probably not a good idea for us to make too much use of inline comments
for this reason - autoformatting can easily drop them to a new line at which
point they go from being helpful to actively misleading.

To be honest I think this is an issue in the specification of `ocamlformat`,
moving an inline comment down is probably almost never the right thing to do.

Reviewed By: grievejia

Differential Revision: D28151440

fbshipit-source-id: 52dff080c158db0f54dbd6ddbba93307524d2dea
Assets 2