scala/scala — pull request #3426 by retronym (2014-01-29 10:29:54+00:00)
Title: SI-8199 Account for module class suffix in -Xmax-classfile-name

The class file name of an inner class is based on the flattened
name of its owner chain.

But, if this is going to be unreasonably long, it is shortened
with the help of a MD5 hash.

However, after this shortening takes place, we sneakily add one
more character (the infamous '$') to the name when it is used
for the module class. It is thus possible to exceed the limit
by one.

The enclosed test failed on Mac with "filename too long" because
of this. I have also tested for trait implementatation classes,
but these seem to be suffixed with "$class" before the name
compactification runs, so they weren't actually a problem.

This change is binary incompatible as separately compiled
defintions and usages of named, inner classes need to agree
on this setting. Most typically, however, these long names
crop up for inner anonymous classes / functions, which are
not prone to the binary incompatiblity, assuming that their
creation hasn't be inlined to a separately compiled client.

Review by @gkossakowski