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

Improve library detection algorithm in LibGpiodDriverFactory #2271

Open
1 task
pgrawehr opened this issue Jan 26, 2024 · 2 comments
Open
1 task

Improve library detection algorithm in LibGpiodDriverFactory #2271

pgrawehr opened this issue Jan 26, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request Priority:0 Work that we can't release without
Milestone

Comments

@pgrawehr
Copy link
Contributor

pgrawehr commented Jan 26, 2024

The current detection algorithm in LibGpidDriver factory is somewhat risky, in that it assumes certain default paths for libraries. A more standard approach would be to just try to use PInvoke and catch the error. Note that this is also a bit tricky since the V1 driver internally also tries various .so files.

Other related work:

  • Check alternatives to exposing LibGpiodDriverVersion enum - Exposing this enum, which should rarely be used by the client (as we want "autodetect" to be the default that should work for almost all users) is not really nice. This includes the enum itself as well as the public methods that use it as arguments. (Previously Check alternatives to exposing LibGpiodDriverVersion enum #2272)
@pgrawehr pgrawehr added the Priority:0 Work that we can't release without label Jan 26, 2024
@ghost ghost added the untriaged label Jan 26, 2024
@krwq krwq assigned krwq and joperezr and unassigned krwq Feb 1, 2024
@krwq krwq added enhancement New feature or request and removed untriaged labels Feb 1, 2024
@krwq
Copy link
Member

krwq commented Apr 11, 2024

[Triage] We want to repeat logic from System.DirectoryServices.Protocols in dotnet/runtime: https://github.com/dotnet/runtime/blob/ff3c5314badbb0952bc86325baf12f2dd6255f6f/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ldap.cs#L70-L99

@krwq
Copy link
Member

krwq commented Apr 11, 2024

we should also look at #2272 as part of this issue as that code might not be needed anymore

@joperezr joperezr added this to the v3.2.0 milestone May 23, 2024
@joperezr joperezr self-assigned this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority:0 Work that we can't release without
Projects
None yet
Development

No branches or pull requests

3 participants