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

Add inventory-0-3-1 optional feature #132

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

danielhenrymantilla
Copy link
Collaborator

@danielhenrymantilla danielhenrymantilla commented Aug 17, 2022

  1. In more recent rust toolchains and/or specific platforms, the ctor hack which inventory relied on was broken (causing safer_ffi may randomly generate empty headers #131);
  2. Since Rust 1.62.0, inventory 0.3.* has been released which, would solve the issue.
  3. But the MSRV of safer-ffi is 1.60.0.

Thence the idea to rely on a Cargo feature for 1.62.0+ users to replace inventory with inventory 0.3.1. This, thus, could have been expected to fix the issue #131 (EDIT: it doesn't 😔).

@danielhenrymantilla danielhenrymantilla added the K-feature Kind: proposed new code to implement new behaviour label Aug 17, 2022
@pan93412
Copy link

pan93412 commented Aug 17, 2022

Unfortunately, it is still not working 😞

截圖 2022-08-17 下午8 58 27

However, I found that some parts of safer-ffi still depended on inventory v0.1.11.

image

But header::generate seems called inventory 0.3.1, as expected:

image

I have no idea for why did this happen after upgrading. Maybe we should report it to the upstream? Not sure about it.

@pan93412
Copy link

pan93412 commented Aug 17, 2022

image

head is still null. I can let you connect to my machine to debug for it. The new commit is wmjtyd/libstock-ffi@cb57d4c

@danielhenrymantilla
Copy link
Collaborator Author

I'll follow up the discussion on the original issue, since inventory 0.3.1 is not a solution

@pan93412
Copy link

Although Inventory 0.3.1 did not fix up that issue, could we can merge it into master for some people who prefer the newer Inventory version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
K-feature Kind: proposed new code to implement new behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants