tropo / tropo-webapi-grails

Grails plugin to develop applications powered by Tropo Webapi
MIT License
8 stars 3 forks source link

public/private mixed warning from STS2.8.0M1 and grails snapshot #6

Closed wstidolph closed 13 years ago

wstidolph commented 13 years ago

This is probably a spurious error, but it seems like a good idea to log it ...

Using the published 0.1.2 of Tropo plugin. with the grails SNAPSHOT development head (commit 53007641ec595b96d9227d3bc35f556eaac6831e), under STS 2.8.0.M1, I get the following error from eclipse about TropoBuilder (after repeated grails clean and eclipse project clean)

Description Resource Path Location Type Groovy:Mixing private and public/protected methods of the same name causes multimethods to be disabled and is forbidden to avoid surprising behaviour. Renaming the private methods will solve the problem. TropoBuilder.groovy /qdfront/.link_to_grails_plugins/tropo-webapi-grails-0.1.2/src/groovy/com/tropo/grails Unknown Java Problem

Why I think it's spurious (from combining two bleeding edges):

Probably it's not a real issue but just thought I'd register this event, just in case it comes up later

mpermar commented 13 years ago

Wow. Thanks for the report Wayne.

It well may be some grails|grails plugin issue, but I'll have a closer look once moved to STS 2.8.0

wstidolph commented 13 years ago

Opened https://issuetracker.springsource.com/browse/STS-2057 to notify the STS team.

wstidolph commented 13 years ago

Error still present in TB ver 0.2. I find it goes away if I change line 134 "buildElement" declaration from private to public.

mpermar commented 13 years ago

Hi Wayne,

So it looks like BuilderSupport probably added a method in the Groovy version bundled with the new STS. I renamed the buildElement method to internalBuildElement. That should fix the issue.

I haven't committed a new version of the plugin yet. I'll wait to see if more stuff comes in.

And thanks for pointing this out!

wstidolph commented 13 years ago

I also think the issue goes away due to changes in STS 2.8.0M2, that seems to be OK with ver 0.2 of the plugin (pre-namechange).

wstidolph commented 12 years ago

I was wrong that the issue goes away (or rather, it is back with the recent STS versions) so if I would appreciate it if you could push a new version of the plugin with the renamed method (sorry to ask, but I'm starting to try and push this app to the test servers and they want to pull from the normal grails repos)

mpermar commented 12 years ago

Hi Wayne,

Version 0.2.1 is released with that name change.

Btw, is the name of your customer public? We love to heard from which companies are using Tropo and what cool stuff they are building with it.

wstidolph commented 12 years ago

Thanks, that will simplify my life ;)

The app isn't yet for a customer, it's a prototype of a product+service idea that I'm trying to start a company around ... if we can pull this off (there's 3 of us now) then the service will be cool - sort of "social media voicemail." The app is named 'quidais' right now but names change fast ...

mpermar commented 12 years ago

cool stuff!

wstidolph commented 12 years ago

Turns out the public/private complaint still happens, even with the renamed buildElement of ver 0.2.1, with STS 2.8.0 SNAPSHOT builds (using groovy 1.8.2.xx-20110006-0900-e37 supplied by ver 2.5.2.xx-20111006-0900-e37 of the groovy-eclipse plugin). So, I renamed validate() to internalValidate() and the warning has gone away ... again. The no-error state persisted through an eclipse restart and a 'grails clean'

Renaming internalValidate() back to validate() brings the error state back.

I wondered if the issue was somehow a need to rename "any private method" so I tried renaming buildArray() to internalBuildArray() while leaving validate() alone - this did not cure the error state; it had to be renaming validate().

The result is that I have "private internalValidate()" and "private buildArray()" and no eclipse/STS warning of a "mixed private/public" error state.