next.js
57e732fc - chore(turbopack): Centralize reqwest TLS feature configs in turbo-tasks-fetch (#72526)

Commit
1 year ago
chore(turbopack): Centralize reqwest TLS feature configs in turbo-tasks-fetch (#72526) Noticed this mess while working with @samcx on #72442 where we had to run: ``` cargo nextest r --features next-core/native-tls -p next-core ``` This PR makes `turbo-tasks-fetch` responsible for setting the `reqwest` TLS features, rather than trying to pass that feature flag down. After this PR, running tests on `next-core` works with just: ``` cargo nextest r -p next-core ``` ## Why? - The feature flag logic was getting duplicated in multiple top-level targets. - Packages that depended on `turbo-tasks-fetch` (directly *or transitively*) had to specify a default feature and make sure that default feature was disabled in the workspace's dependency list so that `cargo test -p package-name` would work - ... or you had to specify a flag when compiling, like `--features next-core/native-tls`. Technically this change gives us less flexibility. We can't produce multiple binaries for the same platform target with different TLS stacks. But I don't think we would've ever used that flexibility anyways.
Author
bgw bgw
Parents
Loading