-
Notifications
You must be signed in to change notification settings - Fork 3
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
Modernize secret-rs to work on modern versions of glib #10
Open
penguin359
wants to merge
20
commits into
nicokoch:master
Choose a base branch
from
penguin359:modernize
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a newer version of glib-rs than the original crate was compiled against. glib-rs 0.0.x fails to compile on Rust 1.22 (2017/11) or newer and much older compilers are just broken in a modern environment. There was a conflict between the libsecret-sys being loaded as private, but the ffi module was exported as public. Defaulted it to private as well.
This version nearly compiles successfully with Rust 1.22 and glib 0.1.3. There are a few lines in util.rs that need to be commented out for that. A slightly newer version of glib-rs should have some improvements to fix that bit of code.
Except for the few lines in util.rs mentioned in the last commit that need to be commented out, this compiles with the newer glib-rs and passes the test suite.
This comments out lines that breaks the lock/unlock calls for secret items and collections. This will need to be reverted once the correct code has been implemented to get this to compile on glib-rs. With this workaround added, the crate compiled even with current stable and nightly compilers using this older glib 0.3.1 crate.
It no longer compiles with Rust 1.22, but it does compile and pass all tests on stable and nightly channels.
Small fix-ups needed for new glib.
Small fix-ups needed for new glib.
from_glib() is now unsafe in this glib release and needs to be wrapped appropriately. Also, the actual classes (structs) for GObjects need to be imported with the FFI now.
This is the latest glib release at this time.
This reverts commit cf4d013.
It is now that it's compatible with the latest dependencies.
With this commit, the last breakage in this crate has been fixed for the latest glib library. All functionality should be restored.
This uses glib::ffi again to access anything it might need from that crate indirectly.
All tests marked as ignored are now fixed and passing.
This was referenced Sep 10, 2023
Open
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enabled secret-rs to compile and work with the latest releases of the glib crate on both stable and nightly Rust channels.
This fixes various errors with translating types to/from glib's FFI and using the glib crates
wrapper!
macro. This branch should compile warning-free.