Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

None-AA Annotations with parameters referencing AA-generated classes are not copied correctly #1211

Description

@chpasha

I have a custom annotation with parameters , one of them refers to another AA-Generated class. This parameter is not copied to generated class correctly (maybe since the AA-class is generated before the referred AA-class). In the end the Annotation looks like @MyAnnotation(param = "error") which obviously breaks the code

as discussed in #982, the ideal solution would be to copy such annotations correctly. If it is not possible, maybe the fall-back solution could be used which consists in skipping annotations marked with @Inherited since they are still discoverable in runtime when using generated class.

Activity

  1. WonderCsabo commented on Nov 5, 2014

    @WonderCsabo
    Member

    BTW, can you provide a reduced test-case project to reproduce this defect?

  2. chpasha commented on Nov 6, 2014

    @chpasha
    Author

    I'll try

  3. chpasha commented on Nov 8, 2014

    @chpasha
    Author

    I don't get it. I try to create a test case using AA 3.1 . But may test annotation is not copied to generated class at all. Are there any extra preconditions for annotation-copy to take place?
    P.S.
    Oh sry, I'm an idiot. I took org.androidannotations as base package for test case, that's why :)

  4. chpasha commented on Nov 8, 2014

    @chpasha
    Author
  5. WonderCsabo commented on Nov 8, 2014

    @WonderCsabo
    Member

    Great test project! However i prefer pushing these test projects to GitHub, so they can be easily browsed without downloading etc. (this is just for the future).

  6. WonderCsabo commented on Nov 8, 2014

    @WonderCsabo
    Member

    OK, unfortunately i cannot debug this in eclipse, because eclipse can actually build the test project... But made some debug logs and built with terminal. Unfortunately there is no remedy, we cannot read the .class argument if it is not present in the classpath (not generated, yet).

    #402 could help us with this.

  7. WonderCsabo commented on Nov 21, 2014

    @WonderCsabo
    Member

    @chpasha did you manage to work on this?

  8. chpasha commented on Nov 21, 2014

    @chpasha
    Author

    not yet, sry. I'm not sure that I'm up to this task anyway, my knowledge of the AA-codebase is almost non-existent.

  9. WonderCsabo commented on Dec 22, 2014

    @WonderCsabo
    Member

    @chpasha no worries, i created a PR. Can you test it?

  10. WonderCsabo commented on Dec 28, 2014

    @WonderCsabo
    Member

    I am closing this one for now, since we implemented the workaround. The real solution would be much harder to do, since it needs an architectural change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions