libnfc icon indicating copy to clipboard operation
libnfc copied to clipboard

Update libusb to version 1.0

Open kenspeckle1 opened this issue 3 years ago • 14 comments
trafficstars

Fixes #191 I reimplemented the usb code for libusb1.0. Currently it uses https://github.com/kenspeckle1/libnfc/tree/update_libusb10_branch as base which in turn updates the libusb10 branch to match the master branch. As such it would be best if PR #672 would be merged before this or the libusb10 branch would be updated in some other way.

A review and help with testing would be greatly appreciated. I only have access to an ACR122U device and a linux pc so I am unable to test other devices or OSes.

kenspeckle1 avatar Jul 11 '22 13:07 kenspeckle1

I tried it on Windows 11 with PN532 UART (built on Visual Studio 2022) It seem that it works fine

hank9999 avatar Sep 02 '23 15:09 hank9999

@hank9999 thank you for testing. I don't think that is project is maintained anymore. Just one pull request was merged over the last two years and no real interactions from the lead developers. I will leave this pull request open for anyone who wants to create a libusb1.0 fork and in the hopes that one day, this project will become active again

kenspeckle1 avatar Oct 01 '23 07:10 kenspeckle1

@hank9999 thank you for testing. I don't think that is project is maintained anymore. Just one pull request was merged over the last two years and no real interactions from the lead developers. I will leave this pull request open for anyone who wants to create a libusb1.0 fork and in the hopes that one day, this project will become active again

Thank you for replying. Yep, the project seems that it is not maintained, hope someone have time to merge the changes.

hank9999 avatar Oct 01 '23 07:10 hank9999

You are right, this project is not actively maintained anymore, but still working as expected.

@kenspeckle1 Could you rebase your work on top of main branch in order to ease rework then merge it?

neomilium avatar Oct 21 '23 15:10 neomilium

Hi @neomilium, nice to see, that the project is not completely abandoned.
I changed to target branch to nfc-tools:master and updated this branch.

kenspeckle1 avatar Oct 30 '23 17:10 kenspeckle1

As the switch between libusb 0.1 to 1.0 is a huge step and can potentially introduces bugs, we need to have a perfectly clean git history. BTW, the review will be more efficient and reliable if all commits are short, understandable and well described in git log. Thanks!

neomilium avatar Nov 03 '23 08:11 neomilium

I do not understand why we can't just squash the commit when merging. My work is based on the 10 year old libusb10 branch with 19 commits from both peugeot and doegox. Wouldn't it be cleaner to squash these commits as well?

kenspeckle1 avatar Nov 06 '23 21:11 kenspeckle1

Also, I will try to fix the history next weekend

kenspeckle1 avatar Nov 06 '23 22:11 kenspeckle1

@neomilium Sadly it took me a bit longer than anticipated but I squashed all commits into one single commit

kenspeckle1 avatar Nov 28 '23 09:11 kenspeckle1

With the commit squash we loose the authoring, and all well-written atomic commits.

AFAIR, some commits were written by @doegox , maybe some by @smortex .

From my point of view its not acceptable and not more reviewable than before, when we had a big and dirty merge commit.

@doegox , @smortex, maybe @iwamatsu and any available authors, as I'm not comfortable with this PR due to the impact what are your position?

neomilium avatar Nov 29 '23 22:11 neomilium

historical branch of libusb10 has commits mostly by myself, one by @LudovicRousseau and one by Lucien Judert. The problem with a massive squash, besides authorship, is that it's impossible to track what was really done by @kenspeckle1 For example I don't see any trace of commit 5f71a79b56ca64f98900146b103a2f361c6dd837 of Lucien in this PR. Maybe there was a good reason to discard it, maybe it was forgotten, hard to say when we have a single squashed commit, and therefore hard to review. And that's just one commit, I didn't spend time comparing every previous commit with this squash.

doegox avatar Nov 29 '23 22:11 doegox

Your code violates the coding style. Additionally, the mingw-cross-compile.sh script seems redundant after this PR, so I suggest deleting it. Also, MSYS2 and Linux seems to have an issue with the location of libusb.h, which uses <libusb-1.0/libusb.h> instead of <libusb.h>. Can you please address these issue? I have modified your PR to make it compatible with the MSYS2 MINGW64 environment. You can follow my patch to make the necessary adjustments to your PR.

ikspress avatar Feb 16 '24 02:02 ikspress