-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
refactor: handling of imports in pretty printer #2683
Conversation
2263ef0
to
a567e54
Compare
a567e54
to
80c6526
Compare
965ef15
to
e9bf602
Compare
009b837
to
b2a2bdd
Compare
cfaf140
to
84d8df9
Compare
5804b2e
to
c593613
Compare
0d1acc8
to
31ab47b
Compare
e7184bc
to
e4b62f7
Compare
Hallelujah! It passed all tests :-) So, I started to split this PR to smaller parts. Please see, review and merge other PRs, which comes from this one. |
89c6e87
to
de3d95c
Compare
@monperrus, I see you gave it a lot of time. Thank you for having look! C1) You removed CtElement#print(boolean), whose purpose was to print Spoon model in form in which it really actually is - without any further modifications of model. Are you sure Spoon should not offer that possibility? C2) I like new |
Hi Pavel, Yes, we're almost ready to merge. You did a fantastic job.
This is the goal of
thanks :-) it's still experimental though (we sometimes create a fake compilation unit on the fly) |
I agree with you, we should keep it hidden. So no change is needed. |
The status of this PR after commit 2dd73cd |
Let's cool it down a little bit. @nharrand I guess you would be the final one to merge. |
Big kudos to Pavel @pvojtechovsky |
} | ||
} else { | ||
//May be this can never happen | ||
throw new SpoonException("Check this case. Is it relvant or not?"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: relvant -> relevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @seintur but it's already merged, would you edit the file directly on Github?
It seems that the reason is writing fully-qualified To solve this, I propose to never write WDYT? |
So, you would like to always write import for classes part of the standard library? (like everything prefixed with |
I'm talking about `toString` which does not involve imports. I want that toString never writes
`java.lang`.
|
My bad for imports. Still why just |
to be backward-compatible and get the client builds passing again. |
Ok my bad, after some clarification, |
And broke also https://ci.inria.fr/sos/job/juliac/1056/ Don't know for sure this is only about java.lang.* stuff. Still investigating the issue... |
Started to analyze. We have three kinds of regressions:
I'm on it. |
This PR implements #2624