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
CLASS_EXTRACTION_ERROR - Don't know how to extract Class from type 'T'. #77
Comments
Forgot to mention, this is with version 1.0.1. |
From debugging the code, it seems fairly involved. In case you'd like to see what I've been doing, I've shared the project (binarytemple/javers-example) with you. The branch concerned is called etp-attempt. I've left it where it is for now. |
Hi, I can't see javers-example repository. |
Ah, I'd added bartoszwalacik, added you now - https://github.com/binarytemple/javers-example |
thanks for detailed report, w'll see what's going on |
I've check your example repo, and cant see the issue. (btw I've pushed a fix to your repo, to make it compilable - binarytemple/javers-example@77fa76a) So you trying to diff objects of class: public abstract class ETPTerm { But what is Your concrete class?
|
@bartoszwalacik Sorry Bartosz, the problem only manifests when running the class ETPExampleMain on the branch 'etp-attempt'. It produces the following output:
|
ok, got it |
Also, if it's of use to you, I might be able to help by writing a test-case to reproduce the issue this weekend - I haven't had time to figure out the gradle/intellij interaction/build chain yet. |
thanks, the example from the branch 'etp-attempt' is ok |
I was able to get a little further in my investigation, this is reasonably challenging stuff. I've attached screenshots of my debugging session, along with explanations for what I was trying. I'm not 100% certain any chance of this type belongs in your codebase, but perhaps you could give me some feedback and let me know if I'm looking in the right places. This first example just shows looking at the class properties. And then accessing the data in a more complex way. We access the list of declared fields in the superclass, by default |
thanks for that detailed report, regards |
Hi, situation is quite complex here. What we know: In runtime, you are using instances of The problem is, that JaVers gets confused while determinig actual type of property It should be resolved as I'm not an expert in Java Generics, so I need some more research. because your type construction is too complex |
Agreed, the implementation is rather convoluted. I can work around the
|
well, type erasure has also some advantages. In this case, all types can be determined statically, so erasure is not a blocker. For now, I'm sure that JaVers could behave better here and at least determine actual type of |
Thanks man. I'm going to see what i can do to make ETP more robust in the
|
first approach with JaversMember
refactoring: collapsing BeanProperty & FieldProperty toProperty
I've fixed this issue, now it is waiting for CR and release 1.0.3 You can get early access to the new version, it is available as a 1.0.3-SNAPSHOT I've pushed Javers version update to your example branch: Check it out, main problem is solved but another one arise (as I supposed).
JaVers is strongly-typed and we can't support types with unbounded wildcards like
|
Nice work! I had started removing all templating and generics from ETP but just removing those wildcard bounds is much easier to do. Thank you. It will be later in the week before I can test. |
ok, so I'll close this issue as soon as javers 1.0.3 will be released to maven Central. Give us a star if you like JaVers |
1.0.3 released to Central |
Hi there,
When running Javers against the AST classes provided by ETP (Erlang Term Parser) project I provoke a crash in Javers.
The exception is as follows:
As far as I can see, it is choking while reflecting on an instance of the ETPTerm class.
This is a parametrized class, in this case with a signature of:
I'm not clear as to whether this is a bug, or something I can work around. Screenshots are from Intellij.
My end goal is to diff AST graphs of Riak configuration files.
Thanks,
Bryan
The text was updated successfully, but these errors were encountered: