virtualdogbert / enterprise-groovy-plugin

A gradle plugin for adding @CompileStatic by default with optional configurable enforcement.
Apache License 2.0
8 stars 2 forks source link

Use newest enterprise-groovy version #14

Closed demus-nine closed 4 years ago

demus-nine commented 4 years ago

This is related to https://github.com/virtualdogbert/enterprise-groovy/pull/2

demus-nine commented 4 years ago

I've just been converting a project to compilestatic using the plugin. There are a couple of methods, that require dynamic overload resolution at runtime, because if you specifiy fx. Object as the parameter type it will always resolve to the overload with an object parameter. Codenarc also complains, so a @SuppressWarnings('NoDef') is added. Unfortunately the plugin is either on or off, so there is no way to exclude this one method from the def required. In most places def is the devil's work, but here it is not.

Fx: void something(targetObject) { doSomethingWith(targetObject) } where there is a varying number of doSomething overloads taking different types, and which I have no control over can only easily be achieved with runtime overload resolution.

In reality I would expect suppressions to be respected anyway.

demus-nine commented 4 years ago

I've added a commit with the doc changes, but I can't get this PR to update and I can't create a new PR with the new commit. How do you update the PR with a new commit?

virtualdogbert commented 4 years ago

Hmm strange you should be able to update a PR by just pushing new commits to the branch that you are trying to get merged in the PR... but created a new PR will work too, just lose the context of the old PR...

apryamostanov commented 4 years ago

Issue: #15 Plugin PR: https://github.com/virtualdogbert/enterprise-groovy-plugin/pull/16 Linked plugin PR: https://github.com/virtualdogbert/enterprise-groovy-plugin/pull/14 Correspondent library PR: https://github.com/virtualdogbert/enterprise-groovy/pull/2