-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
workspace dependency breaks default-features = false #1236
Comments
I think this can be closed? |
oh great it was released as a minor point release despite being a major breaking change 😓 |
to make more clear what I mean: there is a public struct field in UploadValue ( this feature is on by default, so someone accessing that field directly may have their code randomly break if they have |
this was also not the case in 4.0 (as the |
I suggest the latest release be yoinked immediately as to not break people's code when they run |
I think adding a feature in Cargo.toml is not a big issue. Even if this can be called breaking change. Is not something to fix in code (which is definitely more challenging). Am I wrong? |
Yeah if you explicitly don't care about following semver, putting this out in a minor release is fine of course. I'm gonna try to explain better with an example. Imagine a project with this in the dependencies: async-graphql = { version = "5.0", default-features = false } with a graphql handler like this: async fn some_field(&self, ctx: &Context<'_>, file: Upload) -> Result<Uuid> {
let file = file.value(ctx)?.content;
let content = tokio::task::spawn_blocking(move || -> Result<_> {
let mut buf = Vec::with_capacity(size);
file.read_to_end(&mut buf)?;
Ok(buf)
})
.await??;
do_something_else(&content).await
} when 5.0.6 is in the lockfile, this will compile fine ( once the user runs |
closing in favour of #1263 I guess |
Expected Behavior
default-features = false
on async-graphql should turn off the email-validator, tempfile, playground and graphiql features on async-graphql.Actual Behavior
it does – as long as you don't depend on any other projects from the async-graphql workspace.
Steps to Reproduce the Problem
Specifications
Possible solutions
I have verified that locally, I can fix this by changing one line in the workspace Cargo.toml, namely
however, this is obviously a major breaking change because it will mean that
default-features = false
works again, so I'm not sure how to proceed here. I also don't know if this change will break anything else.The text was updated successfully, but these errors were encountered: