-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Bug] Cannot create shadow class #4529
Comments
I believe this is already fixed with #4356. There was no snapshot or release since then sadly, so if you want to test if the issue is actually fixed, you'll need to install spoon into your local maven repository yourself. (ping @monperrus, maybe it would be time for a new snapshot version at some point?) |
@SirYwell Snapshots are being deployed as they should to OW2 nexus. Only the beta deployments are broken, and we just haven't had the time to look into it. @kl0u Could you try to see if the latest snapshot solves your problem? See the FAQ for how to use a snapshot. |
Thanks a lot for the information. The issue seems to be fixed in the newest SNAPSHOT. One more question, what is the recommended way to print a modified class but with the minimum set of changes? The sniper pretty printer seems to be a good candidate for this but it is having some issues like the #4332. Is there another way? |
The sniper printer is the go-to way for exactly this task. In projects like sorald https://github.com/SpoonLabs/sorald it is used at large scale with not many problems(to my knowledge). These bugs are more or less edge cases you hopefully don't encounter. |
Thanks for the reply @MartinWitt . Unfortunately I bump into the issue I linked and I am wondering if there is even a quick fix that I can test even with a custom build. In any case, thanks a lot. |
BTW I think that it would help a lot when debugging to print here the source code of the element that causes the problem ( |
The problem in #4332 is most likely that source positions from different files are compared. Last time I recall this happening was that a static import statement (e.g. But, in any of these cases, I don't think printing the source code helps. It's a position problem. |
I think I can close this issue as it is already resolved. As for the proposal of printing the source code, the only thing I want to point out is that what is currently printed is not helping with debugging or filing a bug report because it is not easy to parse. Maybe a better option is to print the position so that the user can inspect the code himself/herself. In my case, I modified the Spoon source code to print the code fragment because that was the easiest way to figure out what was causing my problem. Again thanks for the help :) |
Resolved by #4356 as pointed out above. |
Hi all,
With
setNoClasspath(true)
I am getting a:Operating system, JDK and Spoon version used
The text was updated successfully, but these errors were encountered: