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

Conditional compilation deps #2607

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ericmcbride
Copy link
Contributor

@ericmcbride ericmcbride commented Apr 8, 2024

  • addresses Support conditional compilation dependencies #1950
  • This is a WIP and i want more input before I continue. This takes care of the cfg_expr use case of the Flag predicate. AKA cfg(tokio_unstable) or cfg(tokio_dump)
  • Added a new bzl mod example, to show this base use case is fufilled .
  • This takes care of the rustc_flags use case of --cfg tokio_unstable or --cfg tokio_coredump
  • @UebelAndre I would like your input on this approach before I take care of any of the other predicate use cases in cfg_expr Some of my thoughts are, do we need to add metadata to CrateDependency to say we injected this value? Could this be leveraged in the future for optional dependencies so they dont have to be declared explicitly in the library? What were you looking to resolve in ?Support conditional compilation dependencies #1950
  • After the questions / vision of this feature is resolved, will add full documentation + unit tests + more conditional cfg types in the bzl mod example.

@ericmcbride ericmcbride changed the title DRAFT: Conditional compilation deps Conditional compilation deps Apr 9, 2024
@UebelAndre UebelAndre self-requested a review April 23, 2024 16:12
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.

1 participant