-
Notifications
You must be signed in to change notification settings - Fork 677
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: feature gate canonical macros #5004
base: develop
Are you sure you want to change the base?
fix: feature gate canonical macros #5004
Conversation
We use the |
Ahh I see, makes sense. Okay fair enough. Are the other changes okay? Also, would you be okay with activating the [features]
default = ["canonical", "developer-mode"]
canonical = ["rusqlite", "sha2/asm"]
developer-mode = []
slog_json = ["slog-json", "sha2/asm"]
testing = ["canonical"]
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(any(target_os="windows"))))'.dependencies]
sha2 = { version = "0.10", default-features = false } or something similar. Would something like that be acceptable? |
Also, I just want to make it clear that this isn't pressing for us. I wouldn't look at this until after 3.0 is released. |
As the author of #4435, I've looked into this a bit, and I'll share what I know about it. The |
Description
We use several crates in this repository in the https://github.com/stacks-network/sbtc/ repo, and would like to forgo pulling in as many unnecessary dependencies as possible. Fortunately, things here are setup already to accommodate this by allowing users to specify the
developer-mode
feature (settingdefault-features = false
doesn't quite work).This PR makes two changes:
impl_byte_array_rusqlite_only!
macro isn't used whenever thecanonical
feature that defines is set.asm
feature from the sha2 crate. It didn't appear to be used anywhere.Change (2) was made because it was causing us issues. This issue would only happen during
arm64
builds (and only withcargo-lambda
extension) so it's unlikely to be an "actual" issue within this repo. But I figure we should remove an unused dependency if possible. It's not clear to me whether it's actually unused or is sneakily used somewhere.Applicable issues
I haven't opened them yet, (1) seems like the only "bug". You can reproduce by pulling down the
clean-up-stacks-core-dependencies
branch in https://github.com/stacks-network/sbtc and runningcargo build
. I'll open an issue here sometime later.Additional info (benefits, drawbacks, caveats)
Found #4435, but didn't add much color as to why
sha2-asm
needs to be here.Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml