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.

Do not print additional info in compilation messages #849

Description

@WonderCsabo

I think since the newly introduced logger, the compilation error/warning messages are displayed like this:

00:53:54.418 [Worker-253] ERROR o.a.h.AnnotationHelper:110
- @org.androidannotations.annotations.Bean cannot be used on a private element

I think all information except the message after the dash is totally unnecessary to print, it does not help the programmer to resolve the compilation problem. Moreover, this additional information draws the attention away from the real issue.

Activity

  1. DayS commented on Dec 31, 2013

    @DayS
    Contributor

    I understand your point. But this feature was added because of a huge amount of issues without any information to help us nor the stack trace. Also lots of issues are just duplicate because nobody takes the time to check if the issue already exists or not..

    Unless Github provide a way to add an instruction message in new issue page I think we should keep this to not lose more time with these incomplete issues.
    But we could rethink the message format if you have any proposition.

  2. WonderCsabo commented on Dec 31, 2013

    @WonderCsabo
    MemberAuthor

    I do not understand your point. This is a normal error message. These additional information should only be printed when AA crashed. Maybe i misunderstood you? :S

  3. DayS commented on Jan 1, 2014

    @DayS
    Contributor

    Ho sorry. I think I misunderstood your initial request... You're talking about the compilation logs and not crash logs.

    The first part of the message 00:53:54.418 [Worker-253] ERROR o.a.h.AnnotationHelper:110 is a common logging format. As each log is appended in the same log file, at each incremental annotation processing (ie each file saved), the is lots of logs written in the file. So, the hour could be really helpful to retrieve the right log and help the developer to know what's going on.
    Also, the source of the log call help US sometime to know which AA version (mainly if the user uses a snapshot) is using.
    But, I agree the current thread could be removed :)

    Eventually we could use different format according to the appender :

    • FileAppender : hour thread level class - message
    • ConsoleAppender : level class - message
    • MessagerAppender : level class - message

    More importantly, the ConsoleAppender is activated by default in 3.0 due to a bug. It'll be fixed in the 3.0.1 hotfix

  4. WonderCsabo commented on Jan 1, 2014

    @WonderCsabo
    MemberAuthor

    I am aware of this format. Maybe i should clarify what i think.

    The .log file is OK with this format, it helps debugging etc., i totally understand the reason and i think it is a good thing.

    But the compilation messages which appears in various elements of the client code in the IDE itself should not contain the additional info.

  5. DayS commented on Jan 1, 2014

    @DayS
    Contributor

    Ok, I see. (Damn it's hard to think after the new year party xD)

    Compilation messages in IDE are handled by MessagerAppender. You're right, for this one we should remove some info as there are already provided by the IDE. So the only relevants parts are the following: class+line and message. Should we keep both or just the message ?

  6. WonderCsabo commented on Jan 1, 2014

    @WonderCsabo
    MemberAuthor

    I think we should just keep the message. It is totally irrelevant to a non-AA developer which generator class is responsible for that message and on which line exactly. Moreover it draws the attention away from the real issue and it can confuse beginner programmers. So for the IDE compilation messages, the pre-3.0 behavior is the best i think.

    No problem, and i wish a Happy New Year for the entire AA community. :)

  7. DayS commented on Jan 1, 2014

    @DayS
    Contributor

    I guess you're right. I'll push a PR very soon.

  8. DayS commented on Jan 1, 2014

    @DayS
    Contributor

    Fixed. I'll wait a few more days before releasing the 3.0.1 hotfix

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions