Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Groovy traits to better separate Omni RPCs from Bitcoin RPCs #29

Closed
msgilligan opened this issue Jan 25, 2015 · 7 comments
Closed
Milestone

Comments

@msgilligan
Copy link
Member

See the work in the branch msgilligan-cliapi-traits

@msgilligan
Copy link
Member Author

Note: There seems to be a bug in Groovy 2.4.0 that occurs when the following lines are enabled in BitcoinCLIAPI.groovy:

@SelfType(BitcoinClient)
@CompileStatic

I've filed bug GROOVY-7275 on Groovy JIRA.

I'm also seeing two issues in the current latest IntelliJ:

  1. IntelliJ doesn't seem to recognize the @SelfType(BitcoinClient) annotation yet and as a result can't find the methods called from the superclass.
  2. IntelliJ is complaining about default parameters with the message: "Default Initializers are not allowed in abstract methods"

@msgilligan msgilligan added this to the 0.3 milestone Feb 2, 2015
@msgilligan
Copy link
Member Author

Groovy bug GROOVY-7275 is fixed in Groovy 2.4.1 and bitcoin-spock has been updated, so it may be time to try this again.

Although I'm thinking that it might be better if the "CLI" clients just warp the standard Java clients, rather than extend them, so traits may be less necessary.

@dexX7
Copy link
Member

dexX7 commented Feb 20, 2015

That's great to hear.

Point 2 seems to be an issue of IntelliJ, and using default values appears to work just fine, despite the error tag. Given there are quite a few methods that could be reduced and merged by using defaults, even though the error is a bit distracting.

@msgilligan
Copy link
Member Author

I need to renew my IntelliJ subscription and upgrade to the latest version. If the IntelliJ problems continue, I'll report them as bugs.

@dexX7
Copy link
Member

dexX7 commented Feb 20, 2015

I'm currently using an EAP build of the v14.1 community edition, where the issue is still present.

@dexX7
Copy link
Member

dexX7 commented Mar 3, 2015

I noticed in the latest EAP release notes "Good Groovy code red - traits with Generic" (IDEA-134978), however the issue related to default initializer values ("Default Initializers are not allowed in abstract methods") is still unfixed.

@msgilligan
Copy link
Member Author

This is complete, except for completing the CLI clients. I've opened Issue #64 for that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants