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

fix: Allow cargo build --all-features #204

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

jayvdb
Copy link
Contributor

@jayvdb jayvdb commented Nov 13, 2023

I believe there is also a crate which allows mutually exclusive features, so we could do that instead.

@jayvdb
Copy link
Contributor Author

jayvdb commented Nov 13, 2023

https://github.com/omid/mutually_exclusive_features could be used to enforce that one of time or chrono is enabled.

Currently it isnt possible to disable both features, as that results in build errors - many due to Timestamp not having a definition, but also things like missing members of JobContext that other code relies on.

error[E0425]: cannot find value `sleeper` in this scope
  --> packages/apalis-core/src/worker/ready.rs:82:21
   |
82 |                     sleeper.sleep(interval).await;
   |                     ^^^^^^^ not found in this scope

error[E0063]: missing field `run_at` in initializer of `JobContext`
  --> packages/apalis-core/src/context.rs:51:9
   |
51 |         JobContext {
   |         ^^^^^^^^^^ missing `run_at`

@jayvdb
Copy link
Contributor Author

jayvdb commented Nov 14, 2023

Probably related, each Cargo.toml includes

[package.metadata.docs.rs]
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]
all-features = true

I guess that means docs.rs is going to wants all features to be able to compile together.
https://docs.rs/about/metadata

so if we dont go ahead with this PR, then we need to remove all-features = true and instead manually list the features which should be used on docs.rs

@geofmureithi geofmureithi merged commit dd75509 into geofmureithi:master Nov 15, 2023
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