Page MenuHomePhabricator

Make the Arcanist comment remover less aggressive about stripping instructional comments
ClosedPublic

Authored by epriestley on Sep 5 2018, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 26, 1:42 PM
Unknown Object (File)
Sat, Mar 23, 2:26 PM
Unknown Object (File)
Sun, Mar 17, 5:09 PM
Unknown Object (File)
Thu, Mar 14, 4:53 PM
Unknown Object (File)
Fri, Mar 1, 4:06 AM
Unknown Object (File)
Feb 21 2024, 12:01 PM
Unknown Object (File)
Feb 3 2024, 7:22 PM
Unknown Object (File)
Feb 3 2024, 7:22 PM
Subscribers

Details

Summary

Ref T13098. See PHI858. If you write this at the end of a message in arc diff:

Subscribers:
#projectname

# NEW DIFFERENTIAL REVISION
# Describe the changes in this new revision.
# ...

...we'll currently eat the #projectname as an instructional comment, even if it is followed by an empty line.

Instead, stop eating stuff once we hit the first empty line. (We escape empty lines in comments already.)

After T13098 I'll maybe adjust this to use a more explicit instruction escape, like ##, since there's no reason we're bound to #.

Test Plan

Added a unit test and made it pass.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 5 2018, 10:40 PM

https://discourse.phabricator-community.org/t/latest-arcanist-incorrecly-parses-comments/2013 reports an issue with this new behavior - probably if the Subscribers is left empty, the parser takes the first line of the comment.