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 build issue and future incompatibility #47176

Merged
merged 3 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
140 changes: 2 additions & 138 deletions packages/next-swc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/next-swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ dialoguer = "0.10.3"
dunce = "1.0.3"
futures = "0.3.26"
futures-retry = "0.6.0"
httpmock = "0.6.7"
httpmock = { version = "0.6.7", default-features = false }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because of a transitive dependency which won't compile with some future version of rust

we don't need it, as we don't care about cookie support

indexmap = "1.9.2"
indicatif = "0.17.3"
indoc = "2.0.0"
Expand Down
8 changes: 3 additions & 5 deletions packages/next-swc/crates/napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ default = ["rustls-tls"]
# this is due to some of transitive dependencies have features cannot be enabled at the same time
# (i.e wasmer/default vs wasmer/js-default) while cargo merges all the features at once.
plugin = ["next-binding/__swc_core_binding_napi_plugin", "next-swc/plugin"]
sentry_native_tls = ["_sentry_native_tls"]
sentry_rustls = ["_sentry_rustls"]
sentry_native_tls = ["sentry", "sentry/native-tls", "native-tls"]
sentry_rustls = ["sentry", "sentry/rustls", "rustls-tls"]

native-tls = ["next-binding/__turbo_native_tls"]
rustls-tls = ["next-binding/__turbo_rustls_tls"]
Expand Down Expand Up @@ -57,12 +57,10 @@ turbo-malloc = { workspace = true }
# allow to specify alternative (rustls) instead via features.
# Note to opt in rustls default-features should be disabled
# (--no-default-features --features sentry_rustls)
_sentry_native_tls = { package = "sentry", version = "0.27.0", optional = true }
_sentry_rustls = { package = "sentry", version = "0.27.0", default-features = false, features = [
sentry = { version = "0.27.0", default-features = false, features = [
"backtrace",
"contexts",
"panic",
"rustls",
"reqwest",
], optional = true }

Expand Down
6 changes: 6 additions & 0 deletions packages/next-swc/crates/napi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ pub fn complete_output(
}

pub type ArcCompiler = Arc<Compiler>;

#[cfg(all(feature = "native-tls", feature = "rustls-tls"))]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a nice to have

compile_error!("You can't enable both `native-tls` and `rustls-tls`");

#[cfg(all(not(feature = "native-tls"), not(feature = "rustls-tls")))]
compile_error!("You have to enable one of the TLS backends: `native-tls` or `rustls-tls`");
2 changes: 1 addition & 1 deletion packages/next-swc/crates/next-dev-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ chromiumoxide = { workspace = true, features = [
], default-features = false }
dunce = { workspace = true }
futures = { workspace = true }
httpmock = { workspace = true, features = ["standalone"] }
httpmock = { workspace = true, default-features = false, features = ["standalone"] }
lazy_static = { workspace = true }
mime = { workspace = true }
next-core = { workspace = true }
Expand Down