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

0.8.29 should be a major bump #73

Open
l4l opened this issue Oct 26, 2021 · 3 comments
Open

0.8.29 should be a major bump #73

l4l opened this issue Oct 26, 2021 · 3 comments

Comments

@l4l
Copy link

l4l commented Oct 26, 2021

Commit cecda92 introduces an alloc feature and adds it to the defaults. Unfortunately this breaks semver, in particularly for those crates that use cargo parametr default-features = false. As an example you may easily reproduce it with rust-fontconfig = "0.1.5" dependency, its output:

error[E0599]: no method named `decode_to_string_without_replacement` found for struct `Decoder` in the current scope
  --> /home/kitsu/.cargo/registry/src/github.com-1ecc6299db9ec823/allsorts_no_std-0.5.2/src/get_name.rs:94:36
   |
94 |         let (res, _read) = decoder.decode_to_string_without_replacement(data, &mut s, true);
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `decode_to_str_without_replacement`

error: aborting due to previous error

and manually downgrading encoding_rs = "0.8.28" in Cargo.lock solves the problem.

@hsivonen
Copy link
Owner

That's sad. Since there were no default features previously, my assumption was that no one would have had a reason to do default-features = false and a one-time addition of default features would be semver-compatible.

Do I understand correctly that default-features = false is transitive so that rust-fontconfig setting default-features = false for allsorts_no_std ends up causing allsorts_no_std to propagate default-features = false to encoding_rs despite allsorts_no_std not saying so?

@l4l
Copy link
Author

l4l commented Oct 27, 2021

Actually there's something strange published for allsorts_no_std, it's cargo.toml differs from the github sources. It directly disables features of encoding_rs. Apparently rust-fontconfig is redundant for the example.

@hsivonen
Copy link
Owner

I've examined quite a number of crates the depend on encoding_rs, and allsorts_no_std is an exception by disabling default features before there were any to disable. Instead of yanking the latest encoding_rs right away, I'm going to see if a new release of allsorts_no_std could be made.

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

No branches or pull requests

2 participants