alex314159 / ib-re-actor-976-plus

A clojure friendly wrapper for the Interactive Brokers java API.
24 stars 3 forks source link

Breaking EWrapper interface change in API 9.79 beta - tickOptionComputation signature #1

Closed pjlegato closed 4 years ago

pjlegato commented 4 years ago

Just a heads up that the method signature for tickOptionComputation in EWrapper changes in the newer 9.79 beta of twsapi, breaking ib-re-actor with that version

I'm using 9.76 as a workaround for now; recording this in case anyone else runs across this issue.

Updating EWrapper.java in the ib-re-actor source with the new one from 9.79 might fix it.

Trying to load wrapper.clj with 9.79 yields:

2. Unhandled clojure.lang.Compiler$CompilerException
   Error compiling /Users/pjlegato/.m2/repository/ib-re-actor-976-plus/ib-re-actor-976-plus/0.1.1-SNAPSHOT/ib-re-actor-976-plus-0.1.1-SNAPSHOT.jar:ib_re_actor_976_plus/wrapper.clj at (168:25)
   #:clojure.error{:phase :compile-syntax-check,
                   :line 168,
                   :column 25,
                   :source
                   "/Users/pjlegato/.m2/repository/ib-re-actor-976-plus/ib-re-actor-976-plus/0.1.1-SNAPSHOT/ib-re-actor-976-plus-0.1.1-SNAPSHOT.jar:ib_re_actor_976_plus/wrapper.clj",
                   :symbol reify*}
[...]
1. Caused by java.lang.IllegalArgumentException
   Can't define method not in interfaces: tickOptionComputation
alex314159 commented 4 years ago

good catch thank you - maybe I should include one EWrapper.java per version and then load the right one depending on the version that's imported

alex314159 commented 4 years ago

Hi Paul can you maybe try the [ewrapperversioning] branch which I just pushed? It will naively look for the twsapi version and reference the right ewrapper file. Also I'm not sure it will work on Windows because it filters on the "/" character.

At the moment I have files for 9.76.01 (original) and 9.80.03. If you still have 9.79 feel free to add to branch

alex314159 commented 4 years ago

should be fixed with 0.1.2