Skip to content

Conversation

@kersson
Copy link
Contributor

@kersson kersson commented Dec 1, 2023

Follow-up to #2235 that corrects the DependencyKind used. This bug caused optional dependencies to be incorrectly included even no feature activated that dependency. This can lead to crates being compiled with missing features, resulting in compile errors.

For example, sqlx==0.7.3 compiled successfully with 0.30.0, but fails with 0.31.0:

sqlx = { version = "0.7.3", default-features = false, features = ["sqlite"] }

because default-features = false should remove the optional dependency sqlx-macros. Instead, however, it gets incorrectly included but with its crate dependencies' features missing, resulting in compile errors.

Related issue:

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

@illicitonion illicitonion merged commit 0e39579 into bazelbuild:main Dec 1, 2023
@kersson kersson deleted the fix-optional-build-dep branch December 1, 2023 14:25
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

Successfully merging this pull request may close these issues.

2 participants