groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <>
Subject Binary compatibility issue with GroovyClassLoader
Date Fri, 30 Mar 2018 12:06:43 GMT
I have been cleaning up things ready for the rc1 release. I noticed a few
binary compatibility issues that have crept into the code base. There are a
couple in what I deem internal classes so I am not too worried about them
but I'll clean up where it makes sense.

In groovy.lang.GroovyClassLoader we have two protected properties,
classCache and sourceCache that have different types in 2.4 and 2.5+. Map
vs EvictableCache.

This will obviously break code built on one version of Groovy that someone
might like to use with the other. It seems we should avoid that. I tried
playing around with deprecating the Map fields and introducing some
alternate fields:

But I am not really happy with it. The alternative would be to make
EvictableCache more Map like and revert the field types. It is close but
just a little different and might require some finessing, e.g. we might
make entrySet() throw UnsupportedOperationException for instance. I'll
explore that possibility further but does anyone have alternative thoughts?

Cheers, Paul.

View raw message