Closed toadzky closed 7 years ago
Are you using Windows ?
Nope, I'm on a Mac. I'm pretty sure it's a JVM limitation. I would guess it might be related to Windows limitations but it's a cross platform issue.
On Thu, Mar 9, 2017, 13:46 DuyHai DOAN notifications@github.com wrote:
Are you using Windows ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/doanduyhai/Achilles/issues/293#issuecomment-285477842, or mute the thread https://github.com/notifications/unsubscribe-auth/ACLkWluiWkq7TxxAB5odbHmhkMlzQhj4ks5rkGUdgaJpZM4MV1k_ .
So your generated class name is:
ConditionByGotoDestinationEntity_Select$ConditionByGotoDestinationEntity_SelectWhereTypedMap_GotoDestinationType$gotoDestinationType_And_gotoDestinationAddress_And_destinationGroupAddress_And_destinationType_And_destinationAddress_And_identifier_Relation
It has 255 characters. The Java specs says that your class name can have up to 65535 characters: http://stackoverflow.com/questions/1039029/does-java-have-a-limit-on-the-class-name-length
Indeed you're on Mac and the max allowed filename length is 255 characters with HFS+ filesystem, see here: http://apple.stackexchange.com/questions/86611/does-os-x-enforce-a-maximum-filename-length-or-character-restriction
it's definitely still a bug because it means you can run it on a mac. that's a supported platform right?
Humm, fair enough but my problem is how to shorten the classname without loosing its semantics ...
Ohhhh, idea !
How about adding a new @AchillesCompileTimeConfig
attribute to force Achilles to use randomly generated short name instead of using the natural name ?
So that if you're on MAC it should do the job !
@toadzky
You should probably make it the default configuration with an option to override. Based on a wikipedia comparison of file systems, exFAT, NTFS, ext2/3/4, ZFS, and several others all have the same 255 character filename limit.
Source: https://en.wikipedia.org/wiki/Comparison_of_file_systems
thanks for the link
Since generated DSL class names are created by concatenating primary key fields, when a class has multiple primary key fields that are descriptively named, the generated code fails to compile because the class name is too long.