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

fix: comment of CtAnnotation value #2587

Merged
merged 5 commits into from
Oct 23, 2018
Merged

Conversation

monperrus
Copy link
Collaborator

fix #2209

Note that it's a partial fix, the comment should be added to the expression inside the annotation, but it's still much better than the dirty exception in logs of before.

@tdurieux
Copy link
Collaborator

It is not a fix, you basically remove the log.

I strongly disagree with this solution.

This log is designed to detect thoses cases.

@monperrus
Copy link
Collaborator Author

It's not only removing the log, the comment is attached to an element, so there is a new best-effort behavior.

Are you against this best-effort behavior?

@tdurieux
Copy link
Collaborator

I'm against this one because from my experience the computed parent of comment can be pretty far from an acceptable target.

And also because you removed the only way to detect those buggy case. From my point of view, this log is one of the best logs you can have. When this log is printed it means that there is a bug in the application.
With your changes, you completely remove the ability to detect unhandled cases, and the only argument you used was to make the logs nicer when a bug is present.

The solution is to fix the bug that the log you want to remove detected.

@monperrus monperrus changed the title fix comment in annotation bug WIP fix comment in annotation bug Oct 1, 2018
@monperrus
Copy link
Collaborator Author

I see what you mean. I've deleted the best effort idea and restored the log.

I've isolated the problem in a failing test case, could you have a look at it? Thanks!

@monperrus
Copy link
Collaborator Author

@pvojtechovsky could you have a look at this one?

@pvojtechovsky
Copy link
Collaborator

ok, I will have a look

@pvojtechovsky
Copy link
Collaborator

rebase was needed. I did it

@pvojtechovsky pvojtechovsky changed the title WIP fix comment in annotation bug fix: comment of CtAnnotation value Oct 23, 2018
@monperrus monperrus merged commit 507686b into INRIA:master Oct 23, 2018
@monperrus
Copy link
Collaborator Author

Many thanks Pavel!

@pvojtechovsky
Copy link
Collaborator

You are welcome Martin ;-)

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

Successfully merging this pull request may close these issues.

bug: comment not attached to element (error message in log)
3 participants