Comments (9)
Sorry my bad :( my fault the generator did not generate the super type call first time round
from icepick.
It appears that this issue has returned in 2.3.2. My SubType$$Icicle
methods are called, but the SuperType$$Icicle
methods are not.
from icepick.
That sounds weird. For me both the sample
project with superclass and the tests are fine. Can you copy/paste the generated classes? SubType$$Icicle
should have a call to SuperType$$Icicle
in both save and restore instance state.
Gradle > Clean your project may also help. Maybe you were using another version and the generated classes have not been updated.
from icepick.
I have cleaned the project and the SubType$$Icicle
class is generated without calls to the SuperType$$Icicle
methods. Could it be because SuperType
is in an Android library project and not in the same project/package as SubType
? I will try to verify this theory later today or tomorrow when I have time.
from icepick.
This does appear to be the issue. When SuperType
and SubType
are in the same project, SubType$$Icicle
is generated with calls to SuperType$$Icicle
. But if SuperType
is moved to a library project (which SubType
's project uses), then SubType$$Icicle
no longer contains the calls to SuperType$$Icicle
.
I have tried adding both the library jar and src/
to the annotation processor factory path, but it did not help. Any idea why the processor is not seeing SuperType
in the library project?
from icepick.
I see. The problem is that only the annotations of one project are processed at time, so the Processor
can't tell if the class inherits from an annotated parents.
A solution could be to scan all parent's fields and see if there is an @Icicle
annotation and thus call the generated file, but it seems that getAnnotationMirrors
is not working properly across projects. Plus, this will considerably slow down the build time.
I'll have a look at it. I'm reopening the issue in the meanwhile.
from icepick.
@pushbit I just pushed a 2.3.2-SNAPSHOT on Maven. This is a feature that it makes sense to support, regardless of the drop in performance. Early benchmarks shows that is at least 2x slower to walk the hierarchy asking for every field if it has an @Icicle
annotation, but seems to be no other way to retrieve this information from another project. Persisting something on the filesystem can easily get out of hand.
Still, I can probably cut some slow nested loop by keeping track of unsuccessful paths.
Let me know if this fixes your issue.
from icepick.
2.3.3-SNAPSHOT fixes the issue and I don't notice any build slowdown, thanks!
from icepick.
Glad it helped. We're still talking about an order of hundreds of milliseconds, so the build should still be pretty fast. I added a log at the end of the processing that prints how long it took, if anybody notice a slow down they can share their timing.
from icepick.
Related Issues (20)
- Need a tutorial
- Add support for visibility state HOT 3
- Unable to pre-dex exception HOT 2
- Build fails with java.lang.ExceptionInInitializerError HOT 2
- Fix missing @Override in generated classes HOT 1
- Please release 3.2.0
- Any chance to release under Apache-2.0 ??? HOT 1
- How to save state of serialize object.
- java.util.HashMap cannot be cast to java.util.LinkedHashMap HOT 2
- what I did wrong? HOT 1
- Support incremental annotation processing HOT 11
- Gradle error :app:javaPreCompileDebug
- Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' finished with non-zero exit value 1 HOT 3
- Bundler that modifies object in get method
- Could not find icepick-processor.jar in jcenter() HOT 7
- Guys i am trying to run my gradle project but it is showing some errors, can someone help me
- The proguard rule does not work on MI4 (Android 4.4)
- Execution failed for task ':client-app:bootRun'. > Process 'command 'C:\Program Files\Java\jdk1.8.0_161\bin\java.exe'' finished w ith non-zero exit value 1 HOT 3
- Bug: icepick ver3.2.0:「Developer options: ON> Dont keep activities: ON」, when re-generating Activity, instance state value can not be obtained in Icepick.restoreInstanceState
- module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icepick.