HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
547 stars 44 forks source link

delombok'ed sources give incorrect line pointers in error messages #211

Closed dzaima closed 2 years ago

dzaima commented 2 years ago

Delombok changes the number of lines in the sources, thus leading to stacktraces with line numbers (coming from non-delomboked compilations of JWM) being off, making debugging a lot more confusing.

tonsky commented 2 years ago

Hmm, you might be right. What do you think the solution should be? Ship -sources.jar as-is, without delomboking?

mworzala commented 2 years ago

What is the reason for Lombok in this case? It doesn't seem like a ton of typing to add the getters and they don't change super often.

Also would save a step building which is nice.

dzaima commented 2 years ago

Hmm, you might be right. What do you think the solution should be? Ship -sources.jar as-is, without delomboking?

I don't see much benefit for delombok in the sources. The problems I see are readability (which delombok does not make better imo), and the IDE viewing it not liking unknown libraries (but it already does that due to there still being calls to lombok, among also jetbrains annotations). Or are there some other uses for -sources.jar?

Alternatively, compilation could work on the delombok sources, but I assume that'd be hard to make work with the custom build process, and would complicate development while working on the regular non-delombok sources.

tonsky commented 2 years ago

What is the reason for Lombok in this case?

I find it useful, I don’t like fixing getters/toString/equals each time I change fields and that happens from time to time. I don’t find it to have high overhead either.

To be honest, I think it should be in the language, but since it’s not, I’ll take the next best thing.