INRIA / spoon

Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.
http://spoon.gforge.inria.fr/
Other
1.76k stars 352 forks source link

fix: correct spelling mistake in API, doc and tests (#5934) #5943

Closed PinkMoustacheMan closed 2 months ago

PinkMoustacheMan commented 3 months ago
monperrus commented 3 months ago

thanks for the PR. would you have a look at the failing CI job?

PinkMoustacheMan commented 3 months ago

Should the method added to the interface be default and delegate to the deprecated method to avoid breaking changes?

I believe it should be the other way around. The newly added method is the "correct" one. If its implementation changes (let's just assume the changing implementation is backwards compatible) then the deprecated method should follow suit. The "incorrect" method should not be the one that is actively being maintained.

monperrus commented 3 months ago

Per the theory of software engineering, there should be no delegation:

Here, the code is so simple, so I'm happy to merge anyway when CI is green.

PinkMoustacheMan commented 3 months ago

I do agree with the notion that deprecated methods should not change anymore, so I reverted that change. I also fixed the whitespace issue, I thought this was not part of the checks (or that it would be fixed as part of a commit hook or CI step).

monperrus commented 2 months ago

Thanks.

Why do we have a public and a private version of the same method AFAIU? see private boolean shouldBeProcessed

PinkMoustacheMan commented 2 months ago

There is a public shouldBeConsumed method as well as a private shouldBeProcessed method. They are doing the same thing but referencing different fields.

monperrus commented 2 months ago

thanks a lot @PinkMoustacheMan