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

Java 13 compatiblity #23

Open
danielsz opened this issue Sep 25, 2019 · 12 comments
Open

Java 13 compatiblity #23

danielsz opened this issue Sep 25, 2019 · 12 comments

Comments

@danielsz
Copy link

danielsz commented Sep 25, 2019

This library has been a workhorse across java updates. It looks like a bit of work will be required to maintain dependability with the release of java 13 which touched on many aspects of java.nio. The type-specific Buffer classes of java.nio now have absolute (as opposed to relative) bulk get and put methods.

java.nio.ByteBuffer and the other buffer types in java.nio now define absolute bulk get and put methods to transfer contiguous sequences of bytes without regard to or effect on the buffer position.

After upgrading to java 13, I started seeing the following error:

No matching method put found taking 2 args for class java.nio.DirectByteBuffer

Linking back to the source:
https://github.com/Factual/durable-queue/blob/83452cbcc4c15a2244747e77b54a96a23e027691/src/durable_queue.clj#L176

I hope it's a small thing to fix.

markbastian added a commit to markbastian/durable-queue that referenced this issue Apr 7, 2020
vedang pushed a commit to helpshift/durable-queue that referenced this issue Feb 3, 2022
@lkrubner
Copy link

lkrubner commented Feb 4, 2022

It looks like this fix was never made into an official release? Is there anywhere to get this fix? I'd be nervous about maintaining my own fork.

@ztellman
Copy link
Contributor

ztellman commented Feb 6, 2022

I haven't had permission to deploy new releases of this library since roughly 2015, so cutting a new release will require some sort of fork. I'd be surprised if further changes beyond the above are required anytime soon, but if you're very concerned we can also try to see if clj-commons would like to take over this project.

@vedang
Copy link

vedang commented Feb 7, 2022

I think it would be absolutely marvelous to move this to clj-commons or to your personal account @ztellman .

@wmorgan-fsq
Copy link

Hi @ztellman if you want to set up a fork then I'd be happy to link to it from the readme. I think we could also transfer this repo to you or clj-commons directly, but I would have to look up how to do that.

@ztellman
Copy link
Contributor

ztellman commented Feb 8, 2022

Hey @wmorgan-fsq, been a while! I think it's better to transfer over the canonical repo, I can walk you through it once I confirm that clj-commons would like to take it over.

@worace
Copy link

worace commented Feb 8, 2022

Hey thanks for bumping us on this. I had been talking to Daniel Compton via email about moving this to clj-commons a few months ago. I was following up internally on that but let it go cold in some state of security or legal review. Apologies for not being more diligent on that. I'll kick the tires on this again and see if we can get it moved.

@worace
Copy link

worace commented Feb 8, 2022

@danielcompton sorry again I went dark on this. This is the correct GH org, right: https://github.com/clj-commons

Here's what I'm planning to do:

Screen Shot 2022-02-08 at 8 41 56 AM

I think once I do that, someone on your end will get a notification to accept the transfer.

@worace
Copy link

worace commented Feb 8, 2022

Ah, ok I tried but got this:

Screen Shot 2022-02-08 at 8 47 58 AM

Yall probably have some experience with transferring into that org so maybe you can let us know how to proceed

@worace
Copy link

worace commented Feb 9, 2022

OK done. thanks for following up on this folks. Cool to see continued interest in this project

https://github.com/clj-commons/durable-queue

@worace worace closed this as completed Feb 9, 2022
@worace
Copy link

worace commented Feb 9, 2022

ah oops i guess this issue wasnt originally about moving the repo but about something else, so i guess i'll leave it open. sorry to have hijacked the whole thread.

@worace worace reopened this Feb 9, 2022
@lkrubner
Copy link

lkrubner commented Mar 3, 2022

@worace -- I had the impression the fix was there, but hasn't been merged to a release branch yet?

@worace
Copy link

worace commented Mar 3, 2022

@lkrubner i'm not sure anything was actually merged...I had accidentally closed the issue b/c we finished dealing with the repo transfer but not the actual underlying issue.

I'm afraid I haven't been following the actual issue under discussion here so you may need to ping someone else for updates on that part.

boxxxie pushed a commit to boxxxie/durable-queue that referenced this issue Apr 13, 2022
vedang pushed a commit to vedang/durable-queue that referenced this issue May 2, 2023
Fixes Java 13+ compatiblity issues, as noted in
clj-commons#23. Copying the relevant parts from the
Issue:

   `java.nio.ByteBuffer` and the other buffer types in `java.nio` now
   define absolute bulk `get` and `put` methods to transfer contiguous
   sequences of bytes without regard to or effect on the buffer
   position.

Due to this, running durable-queue against Java 13+ leads to the
following error:

   No matching method put found taking 2 args for class
   `java.nio.DirectByteBuffer`

This commit fixes the problem by adding the relevant type-hints

Author: Mark Bastian
Ref:    https://github.com/markbastian/durable-queue
Closes: clj-commons#23
Closes: clj-commons#24
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

6 participants