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

Conditionally compile versions #2559

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

Conversation

tbro
Copy link
Contributor

@tbro tbro commented Feb 7, 2025

Closes #2558

With this change you can pass --feature fee to only compile fee version. The idea is to reduce compile time by targeting only those features you are currently working on / testing. For CI in its current state we will probably need to enable 2 versions most of the time.

I'm not sure about configuration through the environment, but the following leads me to believe we can pass the proper configuration to rustc:

RUSTFLAGS="--cfg feature=\"fee\"" cargo +nightly -Z unstable-options rustc --print cfg

Note that --print option of cargo rustc is only available on nightly.

tbro added 4 commits February 7, 2025 16:22
For tests in their current state we will probably need to enable 2
versions most of the time. I'm not sure about configuration through
the environment, but this leads me to believe we can pass the proper
configuration to `rustc`.

    RUSTFLAGS="--cfg feature=\"fee\"" cargo +nightly -Z unstable-options rustc --print cfg

Note that `--print` option of `cargo rustc` is only available on nightly.

Closes #2558
@tbro tbro marked this pull request as ready for review February 7, 2025 20:50
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.

Conditional Compilation of Application Versions
1 participant