Skip to content

fix: remove transitive dependency on aws-lc-rs - #983

Merged
CppCXY merged 1 commit into
EmmyLuaLs:mainfrom
mrcjkb:mj/push-wvqmzkptprvq
Mar 11, 2026
Merged

CppCXY merged 1 commit into
EmmyLuaLs:mainfrom
mrcjkb:mj/push-wvqmzkptprvq

Conversation

@mrcjkb

@mrcjkb mrcjkb commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

reqwest has recently changed their default TLS provider to rustls, which pulls in a dependency on aws-lc-rs and causes linking errors when trying to build on Windows.

See also:

Because of this, bumping the emmylua_check dependency causes a Lux build failure on Windows:

If TLS support is needed, I'd recommend to enable one of the following features instead of the default-tls (aka rustls):

  • rustls-no-provider
  • native-tls
  • native-tls-vendored (e.g. enabled via a vendored feature flag)

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical build failure on Windows systems caused by a transitive dependency on aws-lc-rs, which was introduced by reqwest's default-tls feature. By reconfiguring the reqwest dependency to explicitly select necessary features while disabling the problematic default TLS, the project can now build successfully across platforms without introducing unwanted linking issues.

Highlights

  • Dependency Resolution: Addressed Windows build failures by removing the transitive aws-lc-rs dependency.
  • reqwest Configuration: Explicitly configured the reqwest crate to disable its default-tls feature and enable http2, charset, and system-proxy features instead.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Cargo.lock
    • Removed aws-lc-rs and aws-lc-sys packages.
    • Removed cesu8, cmake, combine, core-foundation, dunce, fs_extra, jni, jni-sys, jobserver, lru-slab, openssl-probe, quinn, quinn-proto, quinn-udp, rand (older version), rand_chacha (older version), rand_core (older version), rustc-hash (older version), rustls-native-certs, rustls-platform-verifier, rustls-platform-verifier-android, schannel, security-framework, security-framework-sys, tinyvec, tinyvec_macros, web-time, webpki-root-certs, windows-sys (older version), windows-targets (older version), windows_aarch64_gnullvm (older version), windows_aarch64_msvc (older version), windows_i686_gnu (older version), windows_i686_msvc (older version), windows_x86_64_gnu (older version), windows_x86_64_gnullvm (older version), windows_x86_64_msvc (older version) packages.
    • Updated rand, rand_chacha, rand_core, rustc-hash, core-foundation dependencies to remove version specifications.
    • Removed js-sys and wasm-bindgen from libc dependencies.
    • Removed web-time from rustls-pki-types dependencies.
    • Removed aws-lc-rs from rustls and rustls-webpki dependencies.
    • Removed quinn, rustls, rustls-pki-types, rustls-platform-verifier, tokio-rustls from reqwest dependencies.
  • Cargo.toml
    • Modified the reqwest dependency to explicitly disable default-tls and enable http2, charset, and system-proxy features.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request correctly identifies and fixes a build issue on Windows by removing the transitive dependency on aws-lc-rs. This is achieved by disabling default features for reqwest. However, this change also disables essential features like TLS support and content compression. My review includes a critical suggestion to re-enable TLS using native-tls to ensure HTTPS requests continue to work, and also re-enables compression features for better performance.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment thread Cargo.toml
Comment on lines +60 to +64
reqwest = { version = "0.13.1", default-features = false, features = [
"http2",
"charset",
"system-proxy",
] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

By disabling default features, you've also disabled TLS support and content compression features like gzip, brotli, and deflate. TLS is critical for HTTPS requests to work, for example when downloading EmmyLua definitions. The compression features are important for performance.

As you mentioned in the PR description, you should enable an alternative TLS backend. I'd recommend native-tls as it's a good cross-platform choice that avoids the aws-lc-rs dependency issue. I've also added back the compression features.

Suggested change
reqwest = { version = "0.13.1", default-features = false, features = [
"http2",
"charset",
"system-proxy",
] }
reqwest = { version = "0.13.1", default-features = false, features = [
"http2",
"charset",
"system-proxy",
"native-tls",
"gzip",
"brotli",
"deflate"
] }

@mrcjkb mrcjkb Mar 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This review comment needs to be checked:

The proposed compression features are not part of reqwest's default feature set - this seems like an LLM hallucination.

I've enabled native-tls-vendored for now (as native-tls requires openssl). However, this should probably be configurable via a feature flag.

@mrcjkb
mrcjkb force-pushed the mj/push-wvqmzkptprvq branch 2 times, most recently from 07e9475 to 292f65e Compare March 10, 2026 21:29
@mrcjkb
mrcjkb force-pushed the mj/push-wvqmzkptprvq branch from 292f65e to 61173ce Compare March 10, 2026 21:39
@CppCXY

CppCXY commented Mar 11, 2026

Copy link
Copy Markdown
Member

reqwest was added only for a feature that is unlikely to be used; should we make the reqwest dependency optional and gate it behind a feature flag?

@mrcjkb

mrcjkb commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

reqwest was added only for a feature that is unlikely to be used; should we make the reqwest dependency optional and gate it behind a feature flag?

That sounds reasonable.
Type checks that need an internet connection do have some downsides.

@CppCXY
CppCXY merged commit d69f645 into EmmyLuaLs:main Mar 11, 2026
22 checks passed
@mrcjkb
mrcjkb deleted the mj/push-wvqmzkptprvq branch March 11, 2026 07:54
@mrcjkb

mrcjkb commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

@CppCXY any plans on pushing a emmylua_check release with this fix?

@CppCXY

CppCXY commented Mar 27, 2026

Copy link
Copy Markdown
Member

@CppCXY any plans on pushing a emmylua_check release with this fix?

The next release date is April 1st, April Fools' Day.

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