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

Remove ring subsubdependency when using actix-multipart. #895

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

simlay
Copy link
Contributor

@simlay simlay commented Jun 5, 2019

This is related to #741.

Setting the default features to false seems like an anti-pattern but it doesn't seem to be a feature to disable single features in cargo yet.

@fafhrd91
Copy link
Member

fafhrd91 commented Jun 6, 2019

You can disable default features in your project. actix-multipart is not appropriate place to do that

@fafhrd91 fafhrd91 closed this Jun 6, 2019
@simlay
Copy link
Contributor Author

simlay commented Jun 6, 2019

I know I can disable default features in my project. The issue is that actix-multipart re-enables the secure-cookies feature in actix-web which results in actix-http using ring.

For example, if I start with the following Cargo.toml

[package]
name = "foobar"
version = "0.1.0"
authors = ["simlay <simlay@localhost>"]
edition = "2018"

[dependencies]
actix-web = { version = "1.0.0", default-features = false }
actix-multipart = "0.1.2"

and swap out actix-multipart with my branch as found here:

[package]
name = "foobar"
version = "0.1.0"
authors = ["simlay <simlay@localhost>"]
edition = "2018"

[dependencies]
actix-web = { version = "1.0.0", default-features = false }
actix-multipart = { git = "https://github.com/simlay/actix-web.git", path = "actix-multipart", branch = "actix_multipart_default_dependencies" }

Then run I run cargo update and get:

    Updating git repository `https://github.com/simlay/actix-web.git`
    Updating crates.io index
      Adding actix-multipart v0.1.3 (https://github.com/simlay/actix-web.git?branch=actix_multipart_default_dependencies#b836e536)
    Removing actix-multipart v0.1.2
    Removing adler32 v1.0.3
    Removing awc v0.2.1
    Removing brotli-sys v0.3.2
    Removing brotli2 v0.3.2
    Removing build_const v0.2.1
    Removing crc v1.8.1
    Removing crc32fast v1.2.0
    Removing flate2 v1.0.7
    Removing miniz-sys v0.1.12
    Removing miniz_oxide v0.2.1
    Removing miniz_oxide_c_api v0.2.1
    Removing ring v0.14.6
    Removing spin v0.5.0
    Removing untrusted v0.6.2

Which removes ring from the Cargo.lock as desired.

Therefore, implying that the default features are re-enabled by actix-multipart without my change. How else does one fix this?

@fafhrd91 fafhrd91 reopened this Jun 6, 2019
@fafhrd91
Copy link
Member

fafhrd91 commented Jun 6, 2019

seems it is not possible to disable default features

@fafhrd91
Copy link
Member

fafhrd91 commented Jun 6, 2019

could you update changes.md

@simlay simlay force-pushed the actix_multipart_default_dependencies branch from 4937a97 to 49bc46c Compare June 6, 2019 17:40
@simlay simlay force-pushed the actix_multipart_default_dependencies branch from 49bc46c to baba8d1 Compare June 6, 2019 17:43
Copy link
Member

@fafhrd91 fafhrd91 left a comment

Choose a reason for hiding this comment

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

thanks

@fafhrd91 fafhrd91 merged commit c4b7980 into actix:master Jun 7, 2019
lberezy pushed a commit to lberezy/actix-web that referenced this pull request Jun 8, 2019
@PoiScript
Copy link

Hello, sorry to bother your. Could you publish actix-multipart 0.1.3 to the crates.io? It still stays in 0.1.2.

@fafhrd91
Copy link
Member

actix-web 1.0.2 does not depend on ring by default anymore

@PoiScript
Copy link

Actually, I'm using actix-web without any default features right now. But I still getting many unused dependencies from actix-multipart. So I want to upgrade to actix-multipart 0.1.3 and get rid of them.

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