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

safer-ffi-gen 0.9.2 failed to build #2314

Closed
stefunctional opened this issue Nov 14, 2023 · 4 comments
Closed

safer-ffi-gen 0.9.2 failed to build #2314

stefunctional opened this issue Nov 14, 2023 · 4 comments

Comments

@stefunctional
Copy link

Crate name

safer-ffi-gen

Build failure link

https://docs.rs/crate/safer-ffi-gen/0.9.2/builds/943834

Additional details

safer-ffi-gen 0.9.1 was built and documented successfully by docs.rs. 0.9.2 is identical to 0.9.1 modulo the difference in the patch version number.

The failure appears to be due to the dependency safer-ffi 0.1.3 failing to build. However docs.rs was able to build and document this crate successfully.

I was not able to reproduce the failure locally running cargo doc.

@syphar
Copy link
Member

syphar commented Nov 15, 2023

Looking at the Cargo.toml for safer-ffi, they are using the docs.rs metadata and a special feature for the docs build.

You probably have to do the same.

@stefunctional
Copy link
Author

Thank you for your answer. Unless I misunderstood, that does not explain why safer-ffi-gen 0.9.1 built successfully. The only change in safer-ffi-gen 0.9.2 is literally a version bump:

git diff 0.9.1..0.9.2
diff --git a/safer-ffi-gen-macro/Cargo.toml b/safer-ffi-gen-macro/Cargo.toml
index 444efea..c5b8ed3 100644
--- a/safer-ffi-gen-macro/Cargo.toml
+++ b/safer-ffi-gen-macro/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "safer-ffi-gen-macro"
-version = "0.9.1"
+version = "0.9.2"
 authors = ["Tom Leavy", "Stephane Raux"]
 description = "Proc macro implementation for safer-ffi-gen"
 edition = "2021"
diff --git a/safer-ffi-gen/Cargo.toml b/safer-ffi-gen/Cargo.toml
index 09db9cd..e5a3cf5 100644
--- a/safer-ffi-gen/Cargo.toml
+++ b/safer-ffi-gen/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "safer-ffi-gen"
-version = "0.9.1"
+version = "0.9.2"
 authors = ["Tom Leavy", "Stephane Raux"]
 description = "FFI wrapper generator based on safer-ffi"
 edition = "2021"
@@ -14,7 +14,7 @@ headers = ["safer-ffi/headers", "std"]
 std = ["once_cell/std", "safer-ffi/std"]

 [dependencies]
-safer-ffi-gen-macro = { path = "../safer-ffi-gen-macro/", version = "0.9.1"}
+safer-ffi-gen-macro = { path = "../safer-ffi-gen-macro/", version = "0.9.2"}
 safer-ffi = { version = "0.1.3", default-features = false, features = ["alloc", "proc_macros"] }
 once_cell = { version = "1.9", default-features = false, features = ["alloc", "critical-section"] }

Log of successful build of safer-ffi-gen 0.9.1
Log of failed build of safer-ffi-gen 0.9.2

Both depend on safer-ffi = "0.1.3" and that is the version that was used to build based on the logs and Cargo.lock in docs.rs.

@Nemo157
Copy link
Member

Nemo157 commented Nov 15, 2023

There was a new API added to std recently causing that error: https://doc.rust-lang.org/nightly/std/macro.cfg_match.html

rust-lang/rust#117057 is somewhat related, but about it being in the prelude, it looks like safer-ffi is doing a manual glob-import which runs into the same problem and probably needs another upstream issue.

@stefunctional
Copy link
Author

Thank you @Nemo157! That seems to be the cause indeed and safer-ffi has already published a new version where the macro was renamed. The docs for safer-ffi-gen should be built successfully the next time it is published.

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

3 participants