using class binary name same as CmdLineProcessor

Review Request #1489 - Created Dec. 15, 2014 and submitted

Information
Peiyu Wang
pants
868
d4b3568...
Reviewers
pants-reviews
benjyw, dturner-tw, ity, jinfeng, jsirois, patricklaw, zundel

CmdLineProcessor uses binary class name (http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.2.1),

https://github.com/twitter/commons/blob/master/src/java/com/twitter/common/args/apt/CmdLineProcessor.java#L653

Classes that uses CmdLineProcessor as annotation processor would fail,

"Expected classname -> path, got "com.twitter.common.args.ArgsTest$App -> ..."

This patch adds $ to the class name matching, and changed the format of compile/jvm/java/classes/deprecation_report.txt slightly so it's easier to load in testing

https://travis-ci.org/pantsbuild/pants/builds/44126276 passed

David Turner
Jin Feng
Ity Kaul
Peiyu Wang
Eric Ayers
David Turner
Peiyu Wang
Review request changed

Status: Closed (submitted)

Nick Howard (Twitter)

Will this only be used for binary names that only come from java sources that use alphanumeric type names? Java's definition of identifier is wider than Python's, eg あ is a valid Java identifier, but not a valid Python identifier.

The spec doesn't offer much guidance beyond saying that they must be valid unicode, and the names unqualified identifiers must not contain . ; [ /.

http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.2.1

I think this change covers most class names, but doesn't cover all valid Java class names.

Loading...