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

refactor(core&cli): activate default features in build script instead of CLI #11098

Closed

Conversation

amrbashir
Copy link
Member

No description provided.

@amrbashir amrbashir requested a review from a team as a code owner September 23, 2024 17:19
Copy link
Contributor

github-actions bot commented Sep 23, 2024

Package Changes Through 0acf0e5

There are 3 changes which include tauri with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri 2.0.0-rc.16 2.0.0-rc.17
@tauri-apps/cli 2.0.0-rc.17 2.0.0-rc.18
tauri-cli 2.0.0-rc.17 2.0.0-rc.18

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@amrbashir amrbashir changed the title refactor(core&cli): activate tls features in build script instead of CLI refactor(core&cli): activate default features in build script instead of CLI Sep 23, 2024
crates/tauri/build.rs Outdated Show resolved Hide resolved
// and `cargo build --release` same as `tauri build`
// but for `tauri build --debug` we need to build the code
// in `debug` profile and activate `custom-protocol` feature.
if !dev && options.debug && !has_custom_profile {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if !dev && options.debug && !has_custom_profile {
if !dev {

if the custom profile is a debug one we still want to force the feature flag

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

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

i'm not sure if we can actually use this..
from the docs (https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-cfg):

Note that this does not affect Cargo’s dependency resolution. This cannot be used to enable an optional dependency, or enable other Cargo features.

and the TLS features all must enable optional dependencies from reqwest...

@FabianLars
Copy link
Member

FabianLars commented Sep 30, 2024

ngl this feels super over engineered to me anyway. I don't think the old way was that bad, we should just mention the feature flag somewhere

@amrbashir
Copy link
Member Author

:sadge: I guess we will have to use custom logic in tauri-cli for now

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.

3 participants