Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect #198

Merged
merged 1 commit into from
Nov 2, 2017
Merged

Reflect #198

merged 1 commit into from
Nov 2, 2017

Conversation

jvassev
Copy link
Contributor

@jvassev jvassev commented Nov 2, 2017

This implement the suggested fix in #110 using reflection.

@ben-manes
Copy link
Owner

Cool, do you have a sense of the savings? and can you cherry-pick since I had rebased your earlier commit (so different hash)?

@ben-manes
Copy link
Owner

Oh, I see it in the commit message. even better

@jvassev
Copy link
Contributor Author

jvassev commented Nov 2, 2017

Yes, I missed that. After the rebase there are only 11K saved. Still worth it in terms of the simpler code :)

This patch expands on the suggestion in
ben-manes#110 (comment)

Instead of the proposed numeric code the name of factory is used as the
classname to instantiate using reflection.
This reduces the class size with 21K bringing the jar size to 786K.
@ben-manes ben-manes merged commit 86ec6a9 into ben-manes:master Nov 2, 2017
@ben-manes
Copy link
Owner

Yep, good call. Thanks again. :)

@ben-manes
Copy link
Owner

I'm having an issue building with this change now. It looks like the imports are not being resolved, even though it should be in the same package.

ben: caffeine $ gradle clean build

> Task :caffeine:javadoc
javadoc: warning - Error fetching URL: http://typesafehub.github.com/config/latest/api/
1 warning

> Task :caffeine:compileTestJava
/Users/ben/projects/caffeine/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java:18: warning: auxiliary class BLCHeader in BoundedLocalCache.java should not be accessed from outside its own source file
import static com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef.IDLE;
                                                ^
/Users/ben/projects/caffeine/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java:19: warning: auxiliary class BLCHeader in BoundedLocalCache.java should not be accessed from outside its own source file
import static com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef.PROCESSING_TO_IDLE;
                                                ^
/Users/ben/projects/caffeine/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java:20: warning: auxiliary class BLCHeader in BoundedLocalCache.java should not be accessed from outside its own source file
import static com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef.PROCESSING_TO_REQUIRED;
                                                ^
/Users/ben/projects/caffeine/caffeine/src/test/java/com/github/benmanes/caffeine/cache/BoundedLocalCacheTest.java:21: warning: auxiliary class BLCHeader in BoundedLocalCache.java should not be accessed from outside its own source file
import static com.github.benmanes.caffeine.cache.BLCHeader.DrainStatusRef.REQUIRED;
                                                ^
/Users/ben/projects/caffeine/caffeine/src/test/java/com/github/benmanes/caffeine/cache/IsCacheReserializable.java:261: warning: auxiliary class BoundedWeigher in Weigher.java should not be accessed from outside its own source file
      if (weigher instanceof BoundedWeigher<?, ?>) {
                             ^
/Users/ben/projects/caffeine/caffeine/src/test/java/com/github/benmanes/caffeine/cache/IsCacheReserializable.java:262: warning: auxiliary class BoundedWeigher in Weigher.java should not be accessed from outside its own source file
        weigher = (Weigher<K, V>) ((BoundedWeigher<?, ?>) weigher).delegate;
                                    ^
6 warnings

> Task :caffeine:compileGenJava FAILED
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:16: error: package com.github.benmanes.caffeine.base does not exist
import com.github.benmanes.caffeine.base.UnsafeAccess;
                                        ^
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:17: error: package com.github.benmanes.caffeine.cache.stats does not exist
import com.github.benmanes.caffeine.cache.stats.StatsCounter;
                                               ^
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:36: error: cannot find symbol
  static <K, V> BoundedLocalCache<K, V> newBoundedLocalCache(Caffeine<K, V> builder,
                                                             ^
  symbol:   class Caffeine
  location: class LocalCacheFactory
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:37: error: cannot find symbol
      CacheLoader<? super K, V> cacheLoader, boolean async) {
      ^
  symbol:   class CacheLoader
  location: class LocalCacheFactory
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:36: error: cannot find symbol
  static <K, V> BoundedLocalCache<K, V> newBoundedLocalCache(Caffeine<K, V> builder,
                ^
  symbol:   class BoundedLocalCache
  location: class LocalCacheFactory
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:83: error: cannot find symbol
  static class SI<K, V> extends BoundedLocalCache<K, V> {
                                ^
  symbol:   class BoundedLocalCache
  location: class LocalCacheFactory
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:86: error: cannot find symbol
    SI(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
       ^
  symbol:   class Caffeine
  location: class SI<K,V>
  where K,V are type-variables:
    K extends Object declared in class SI
    V extends Object declared in class SI
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:86: error: cannot find symbol
    SI(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                               ^
  symbol:   class CacheLoader
  location: class SI<K,V>
  where K,V are type-variables:
    K extends Object declared in class SI
    V extends Object declared in class SI
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:100: error: cannot find symbol
    private final Ticker ticker;
                  ^
  symbol:   class Ticker
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:102: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque;
                  ^
  symbol:   class AccessOrderDeque
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:102: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque;
                                   ^
  symbol:   class Node
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:104: error: cannot find symbol
    private final Expiry<K, V> expiry;
                  ^
  symbol:   class Expiry
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:106: error: cannot find symbol
    private final TimerWheel<K, V> timerWheel;
                  ^
  symbol:   class TimerWheel
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:110: error: cannot find symbol
    private final MpscGrowableArrayQueue<Runnable> writeBuffer;
                  ^
  symbol:   class MpscGrowableArrayQueue
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:112: error: cannot find symbol
    SIA(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
        ^
  symbol:   class Caffeine
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:112: error: cannot find symbol
    SIA(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                ^
  symbol:   class CacheLoader
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:124: error: cannot find symbol
    public final Ticker expirationTicker() {
                 ^
  symbol:   class Ticker
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:128: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque() {
                    ^
  symbol:   class AccessOrderDeque
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:128: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque() {
                                     ^
  symbol:   class Node
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:136: error: cannot find symbol
    protected final Expiry<K, V> expiry() {
                    ^
  symbol:   class Expiry
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:140: error: cannot find symbol
    protected final TimerWheel<K, V> timerWheel() {
                    ^
  symbol:   class TimerWheel
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:156: error: cannot find symbol
    protected final MpscGrowableArrayQueue<Runnable> writeBuffer() {
                    ^
  symbol:   class MpscGrowableArrayQueue
  location: class SIA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIA
    V extends Object declared in class SIA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:168: error: cannot find symbol
    SIAR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
         ^
  symbol:   class Caffeine
  location: class SIAR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAR
    V extends Object declared in class SIAR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:168: error: cannot find symbol
    SIAR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                 ^
  symbol:   class CacheLoader
  location: class SIAR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAR
    V extends Object declared in class SIAR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:187: error: cannot find symbol
    private final WriteOrderDeque<Node<K, V>> writeOrderDeque;
                  ^
  symbol:   class WriteOrderDeque
  location: class SIAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAW
    V extends Object declared in class SIAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:187: error: cannot find symbol
    private final WriteOrderDeque<Node<K, V>> writeOrderDeque;
                                  ^
  symbol:   class Node
  location: class SIAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAW
    V extends Object declared in class SIAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:191: error: cannot find symbol
    SIAW(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
         ^
  symbol:   class Caffeine
  location: class SIAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAW
    V extends Object declared in class SIAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:191: error: cannot find symbol
    SIAW(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                 ^
  symbol:   class CacheLoader
  location: class SIAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAW
    V extends Object declared in class SIAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:197: error: cannot find symbol
    protected final WriteOrderDeque<Node<K, V>> writeOrderDeque() {
                    ^
  symbol:   class WriteOrderDeque
  location: class SIAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAW
    V extends Object declared in class SIAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:197: error: cannot find symbol
    protected final WriteOrderDeque<Node<K, V>> writeOrderDeque() {
                                    ^
  symbol:   class Node
  location: class SIAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAW
    V extends Object declared in class SIAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:217: error: cannot find symbol
    SIAWR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
          ^
  symbol:   class Caffeine
  location: class SIAWR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAWR
    V extends Object declared in class SIAWR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:217: error: cannot find symbol
    SIAWR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                  ^
  symbol:   class CacheLoader
  location: class SIAWR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SIAWR
    V extends Object declared in class SIAWR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:236: error: cannot find symbol
    private final RemovalListener<K, V> removalListener;
                  ^
  symbol:   class RemovalListener
  location: class SILi<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILi
    V extends Object declared in class SILi
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:238: error: cannot find symbol
    SILi(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
         ^
  symbol:   class Caffeine
  location: class SILi<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILi
    V extends Object declared in class SILi
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:238: error: cannot find symbol
    SILi(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                 ^
  symbol:   class CacheLoader
  location: class SILi<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILi
    V extends Object declared in class SILi
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:243: error: cannot find symbol
    public final RemovalListener<K, V> removalListener() {
                 ^
  symbol:   class RemovalListener
  location: class SILi<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILi
    V extends Object declared in class SILi
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:253: error: cannot find symbol
    private final Ticker ticker;
                  ^
  symbol:   class Ticker
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:255: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque;
                  ^
  symbol:   class AccessOrderDeque
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:255: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque;
                                   ^
  symbol:   class Node
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:257: error: cannot find symbol
    private final Expiry<K, V> expiry;
                  ^
  symbol:   class Expiry
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:259: error: cannot find symbol
    private final TimerWheel<K, V> timerWheel;
                  ^
  symbol:   class TimerWheel
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:263: error: cannot find symbol
    private final MpscGrowableArrayQueue<Runnable> writeBuffer;
                  ^
  symbol:   class MpscGrowableArrayQueue
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:265: error: cannot find symbol
    SILiA(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
          ^
  symbol:   class Caffeine
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:265: error: cannot find symbol
    SILiA(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                  ^
  symbol:   class CacheLoader
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:277: error: cannot find symbol
    public final Ticker expirationTicker() {
                 ^
  symbol:   class Ticker
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:281: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque() {
                    ^
  symbol:   class AccessOrderDeque
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:281: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque() {
                                     ^
  symbol:   class Node
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:289: error: cannot find symbol
    protected final Expiry<K, V> expiry() {
                    ^
  symbol:   class Expiry
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:293: error: cannot find symbol
    protected final TimerWheel<K, V> timerWheel() {
                    ^
  symbol:   class TimerWheel
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:309: error: cannot find symbol
    protected final MpscGrowableArrayQueue<Runnable> writeBuffer() {
                    ^
  symbol:   class MpscGrowableArrayQueue
  location: class SILiA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiA
    V extends Object declared in class SILiA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:321: error: cannot find symbol
    SILiAR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
           ^
  symbol:   class Caffeine
  location: class SILiAR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAR
    V extends Object declared in class SILiAR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:321: error: cannot find symbol
    SILiAR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                   ^
  symbol:   class CacheLoader
  location: class SILiAR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAR
    V extends Object declared in class SILiAR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:340: error: cannot find symbol
    private final WriteOrderDeque<Node<K, V>> writeOrderDeque;
                  ^
  symbol:   class WriteOrderDeque
  location: class SILiAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAW
    V extends Object declared in class SILiAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:340: error: cannot find symbol
    private final WriteOrderDeque<Node<K, V>> writeOrderDeque;
                                  ^
  symbol:   class Node
  location: class SILiAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAW
    V extends Object declared in class SILiAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:344: error: cannot find symbol
    SILiAW(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
           ^
  symbol:   class Caffeine
  location: class SILiAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAW
    V extends Object declared in class SILiAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:344: error: cannot find symbol
    SILiAW(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                   ^
  symbol:   class CacheLoader
  location: class SILiAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAW
    V extends Object declared in class SILiAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:350: error: cannot find symbol
    protected final WriteOrderDeque<Node<K, V>> writeOrderDeque() {
                    ^
  symbol:   class WriteOrderDeque
  location: class SILiAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAW
    V extends Object declared in class SILiAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:350: error: cannot find symbol
    protected final WriteOrderDeque<Node<K, V>> writeOrderDeque() {
                                    ^
  symbol:   class Node
  location: class SILiAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAW
    V extends Object declared in class SILiAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:370: error: cannot find symbol
    SILiAWR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
            ^
  symbol:   class Caffeine
  location: class SILiAWR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAWR
    V extends Object declared in class SILiAWR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:370: error: cannot find symbol
    SILiAWR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                    ^
  symbol:   class CacheLoader
  location: class SILiAWR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiAWR
    V extends Object declared in class SILiAWR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:413: error: cannot find symbol
    private final FrequencySketch<K> sketch;
                  ^
  symbol:   class FrequencySketch
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:415: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque;
                  ^
  symbol:   class AccessOrderDeque
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:415: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque;
                                   ^
  symbol:   class Node
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:417: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderProbationDeque;
                  ^
  symbol:   class AccessOrderDeque
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:417: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderProbationDeque;
                                   ^
  symbol:   class Node
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:419: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderProtectedDeque;
                  ^
  symbol:   class AccessOrderDeque
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:419: error: cannot find symbol
    private final AccessOrderDeque<Node<K, V>> accessOrderProtectedDeque;
                                   ^
  symbol:   class Node
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:421: error: cannot find symbol
    private final MpscGrowableArrayQueue<Runnable> writeBuffer;
                  ^
  symbol:   class MpscGrowableArrayQueue
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:423: error: cannot find symbol
    SILiMS(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
           ^
  symbol:   class Caffeine
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:423: error: cannot find symbol
    SILiMS(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                   ^
  symbol:   class CacheLoader
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:490: error: cannot find symbol
    protected final FrequencySketch<K> frequencySketch() {
                    ^
  symbol:   class FrequencySketch
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:494: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque() {
                    ^
  symbol:   class AccessOrderDeque
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:494: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderEdenDeque() {
                                     ^
  symbol:   class Node
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:498: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderProbationDeque() {
                    ^
  symbol:   class AccessOrderDeque
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:498: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderProbationDeque() {
                                     ^
  symbol:   class Node
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:502: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderProtectedDeque() {
                    ^
  symbol:   class AccessOrderDeque
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:502: error: cannot find symbol
    protected final AccessOrderDeque<Node<K, V>> accessOrderProtectedDeque() {
                                     ^
  symbol:   class Node
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:506: error: cannot find symbol
    protected final MpscGrowableArrayQueue<Runnable> writeBuffer() {
                    ^
  symbol:   class MpscGrowableArrayQueue
  location: class SILiMS<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMS
    V extends Object declared in class SILiMS
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:516: error: cannot find symbol
    private final Ticker ticker;
                  ^
  symbol:   class Ticker
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:518: error: cannot find symbol
    private final Expiry<K, V> expiry;
                  ^
  symbol:   class Expiry
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:520: error: cannot find symbol
    private final TimerWheel<K, V> timerWheel;
                  ^
  symbol:   class TimerWheel
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:524: error: cannot find symbol
    SILiMSA(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
            ^
  symbol:   class Caffeine
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:524: error: cannot find symbol
    SILiMSA(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                    ^
  symbol:   class CacheLoader
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:532: error: cannot find symbol
    public final Ticker expirationTicker() {
                 ^
  symbol:   class Ticker
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:540: error: cannot find symbol
    protected final Expiry<K, V> expiry() {
                    ^
  symbol:   class Expiry
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:544: error: cannot find symbol
    protected final TimerWheel<K, V> timerWheel() {
                    ^
  symbol:   class TimerWheel
  location: class SILiMSA<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSA
    V extends Object declared in class SILiMSA
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:564: error: cannot find symbol
    SILiMSAR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
             ^
  symbol:   class Caffeine
  location: class SILiMSAR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAR
    V extends Object declared in class SILiMSAR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:564: error: cannot find symbol
    SILiMSAR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                     ^
  symbol:   class CacheLoader
  location: class SILiMSAR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAR
    V extends Object declared in class SILiMSAR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:583: error: cannot find symbol
    private final WriteOrderDeque<Node<K, V>> writeOrderDeque;
                  ^
  symbol:   class WriteOrderDeque
  location: class SILiMSAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAW
    V extends Object declared in class SILiMSAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:583: error: cannot find symbol
    private final WriteOrderDeque<Node<K, V>> writeOrderDeque;
                                  ^
  symbol:   class Node
  location: class SILiMSAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAW
    V extends Object declared in class SILiMSAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:587: error: cannot find symbol
    SILiMSAW(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
             ^
  symbol:   class Caffeine
  location: class SILiMSAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAW
    V extends Object declared in class SILiMSAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:587: error: cannot find symbol
    SILiMSAW(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                     ^
  symbol:   class CacheLoader
  location: class SILiMSAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAW
    V extends Object declared in class SILiMSAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:593: error: cannot find symbol
    protected final WriteOrderDeque<Node<K, V>> writeOrderDeque() {
                    ^
  symbol:   class WriteOrderDeque
  location: class SILiMSAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAW
    V extends Object declared in class SILiMSAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:593: error: cannot find symbol
    protected final WriteOrderDeque<Node<K, V>> writeOrderDeque() {
                                    ^
  symbol:   class Node
  location: class SILiMSAW<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAW
    V extends Object declared in class SILiMSAW
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:613: error: cannot find symbol
    SILiMSAWR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
              ^
  symbol:   class Caffeine
  location: class SILiMSAWR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAWR
    V extends Object declared in class SILiMSAWR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:613: error: cannot find symbol
    SILiMSAWR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                      ^
  symbol:   class CacheLoader
  location: class SILiMSAWR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSAWR
    V extends Object declared in class SILiMSAWR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:632: error: cannot find symbol
    private final Ticker ticker;
                  ^
  symbol:   class Ticker
  location: class SILiMSR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSR
    V extends Object declared in class SILiMSR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:636: error: cannot find symbol
    SILiMSR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
            ^
  symbol:   class Caffeine
  location: class SILiMSR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSR
    V extends Object declared in class SILiMSR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:636: error: cannot find symbol
    SILiMSR(Caffeine<K, V> builder, CacheLoader<? super K, V> cacheLoader, boolean async) {
                                    ^
  symbol:   class CacheLoader
  location: class SILiMSR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSR
    V extends Object declared in class SILiMSR
/Users/ben/projects/caffeine/caffeine/build/generated-sources/com/github/benmanes/caffeine/cache/LocalCacheFactory.java:642: error: cannot find symbol
    public final Ticker expirationTicker() {
                 ^
  symbol:   class Ticker
  location: class SILiMSR<K,V>
  where K,V are type-variables:
    K extends Object declared in class SILiMSR
    V extends Object declared in class SILiMSR
100 errors


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':caffeine:compileGenJava'.
> Compilation failed with exit code 1; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 40s
18 actionable tasks: 18 executed

@ben-manes
Copy link
Owner

ben-manes commented Nov 2, 2017

I think this works:

task compileNoDebug(type: JavaCompile) {
  mustRunAfter tasks.compileJava
  source = "${buildDir}/generated-sources/"
  destinationDir = compileJava.destinationDir
  options.debug = false
  options.incremental = false
  classpath = sourceSets.main.runtimeClasspath + sourceSets.main.output
}

Or we can disable compileGenJava. Something like that.

@ben-manes
Copy link
Owner

Okay, I have it all working nicely. I'll check in a fix with some cleanup when I get a chance.

@ben-manes
Copy link
Owner

@jvassev It looks like the NodeFactory enum consumes ~100kb compressed. I don't think using reflection is appropriate in that case. There are a few ways to tackle it, though you might have a more clever idea than I can dream up :)

@ben-manes
Copy link
Owner

@jvassev Any chance you remember why you use class.getClassLoader() versus Class.forName? See #481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants