But Jun,

That change breaks peoples code who weren't calling in that way. I don't
think we should be making breaking changes in a point release like this.

I think we should treat this like a bug for 0.8.2 final, we should be able
to add two commitOffsets methods with and without the param which should
fix the problem, right?

-Jay

On Thu, Oct 30, 2014 at 8:59 AM, Jun Rao <jun...@gmail.com> wrote:

> Jack,
>
> The commit offset api is changed slightly from
>
> def commitOffsets() in 0.8.1.x
>
> to
>
> def commitOffsets(retryOnFailure: Boolean = true) in 0.8.2.x.
>
> If you have been calling the method with parentheses like commitOffsets(),
> then the code will compile in both 0.8.1.x and 0.8.2.x. In general, the
> scala rule (http://docs.scala-lang.org/style/method-invocation.html) for
> omitting parentheses when calling arity-0 methods is that the methods in
> question have no side effects. In this case, commitOffsets() clearly has
> side effect and should have been called with parentheses.
>
> Thanks,
>
> Jun
>
>
>
>
> On Wed, Oct 29, 2014 at 12:40 PM, Jack Foy <j...@whitepages.com> wrote:
>
> > My Scala project built against kafka 0.8.1.1 commits consumer offsets as
> > follows:
> >
> >     connector.commitOffsets
> >
> > This compiles without warnings. When I bumped the library dependency to
> > 0.8.2-beta, the compiler started emitting this error:
> >
> >     [error]
> > src/main/scala/com/whitepages/kafka/consumer/Connector.scala:21: missing
> > arguments for method commitOffsets in trait ConsumerConnector;
> >     [error] follow this method with `_' if you want to treat it as a
> > partially applied function
> >     [error]     connector.commitOffsets
> >     [error]               ^
> >     [error] one error found
> >     [error] (compile:compile) Compilation failed
> >
> > The following change resolved the error:
> >
> >     -    connector.commitOffsets
> >     +    connector.commitOffsets()
> >
> > Should we expect compilation-breaking changes moving from 0.8.1.1 to
> > 0.8.2-beta?
> >
> > --
> > Jack Foy <j...@whitepages.com>
> >
> >
> >
> >
>

Reply via email to