-
Notifications
You must be signed in to change notification settings - Fork 59
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
chore: MSRV 1.63 #163
chore: MSRV 1.63 #163
Conversation
Hi @fundon, Again you've submitted a PR without any context or explanation as to what you're trying to do and why. I appreciate your work, but I really need to understand the motivation behind the change. I see you closed your last PR without actually answering any of the questions I posed. I'm disappointed by that. |
I'm sorry for the lack of clarity. It was also found that the image library, if default-features were turned off, did not need to be raised to 1.70, and that the test cases did not use all features |
If we do not lock the version and use the default features of image, its dependencies may require 1.70, so 1.63 is a minimal adjustment when features are not required. |
@ajrcarey this PR fixes a lot of issues we're having on our project. Please can you merge? |
@fundon I think we can upgrade image to 0.25 too. |
itertools = "0" | ||
log = "0" | ||
maybe-owned = "0" | ||
once_cell = "1" | ||
utf16string = "0" | ||
vecmath = "1" | ||
image = { version = "0.24", default-features = false, optional = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 0.24
and not >= 0.24
? The latter allows for using image
0.25 - does your change? What is the impact of default-features = false
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
0.24 := >=0.24.0, <0.25.0
-
image 0.24
requires msrv1.63
,image 0.25
requires msrv1.67.1
$ cargo msrv
Fetching index
Determining the Minimum Supported Rust Version (MSRV) for toolchain aarch64-apple-darwin
Using check command cargo check
Check for toolchain '1.57.0-aarch64-apple-darwin' failed with:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ error: failed to parse manifest at `/Users/fundon/dev/pdfium-render/Cargo.toml` │
│ │
│ Caused by: │
│ namespaced features with the `dep:` prefix are only allowed on the nightly channel and requires the `-Z namespaced-features` flag on the │
│ command-line │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Check for toolchain '1.70.0-aarch64-apple-darwin' succeeded
Check for toolchain '1.63.0-aarch64-apple-darwin' succeeded
Check for toolchain '1.60.0-aarch64-apple-darwin' failed with:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ error: package `image v0.24.9` cannot be built because it requires rustc 1.63.0 or newer, while the currently active rustc version is 1.60.0 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Check for toolchain '1.61.0-aarch64-apple-darwin' failed with:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ error: package `image v0.24.9` cannot be built because it requires rustc 1.63.0 or newer, while the currently active rustc version is 1.61.0 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Check for toolchain '1.62.1-aarch64-apple-darwin' failed with:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ error: package `image v0.24.9` cannot be built because it requires rustc 1.63.0 or newer, while the currently active rustc version is 1.62.1 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
$ cargo msrv
Fetching index
Determining the Minimum Supported Rust Version (MSRV) for toolchain aarch64-apple-darwin
Using check command cargo check
Check for toolchain '1.57.0-aarch64-apple-darwin' failed with:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ error: failed to parse manifest at `/Users/fundon/dev/pdfium-render/Cargo.toml` │
│ │
│ Caused by: │
│ namespaced features with the `dep:` prefix are only allowed on the nightly channel and requires the `-Z namespaced-features` flag on the │
│ command-line │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Check for toolchain '1.70.0-aarch64-apple-darwin' succeeded
Check for toolchain '1.63.0-aarch64-apple-darwin' failed with:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ error: package `image v0.25.4` cannot be built because it requires rustc 1.67.1 or newer, while the currently active rustc version is 1.63.0 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Unable to install toolchain with `rustup install 1.66.1-aarch64-apple-darwin`.
- some default features of image are not used, so they can be turned off
"png", | ||
"jpeg", | ||
"webp", | ||
] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an advantage to including the features list here, rather than at line 33?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several image format features are used in the test case, which can be enabled on demand to keep it simple.
@@ -54,14 +54,19 @@ windows = { version = "0", optional = true } | |||
|
|||
[build-dependencies] | |||
# Bindgen 0.70.0 and later cause build failures when compiling to WASM. For more details, see: | |||
# | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there was meant to be a link to #156 here. I'll add it separately.
@@ -2,7 +2,7 @@ | |||
name = "pdfium-render" | |||
version = "0.8.25" | |||
edition = "2018" | |||
rust-version = "1.60" | |||
rust-version = "1.63" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks the published MSRV for this crate. You need to clearly and persuasively explain why you are doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like the problem encountered by the above image.
Apologies for the delay; I have been rather ill. I am still not fully recovered, so there will be a further delay. As this crate approaches its release candidate for 1.0, I am increasingly reluctant to merge PRs that make changes to dependencies without a clear justification as to the motivation. Changing dependencies at this point could have a detrimental impact on other consumers, so the PR needs to be persuasive as to why the change is necessary. Neither this PR nor your previous one meet that bar.
What compilation failures? What leads you to the conclusion that compilation failures in your project are caused by When I asked you to explain the changes, you replied:
That's simply repeating what you first said! I have added some comments to the PR itself at the specific points where the changes are not clear to me. I will not accept this PR until you clearly justify why the changes are necessary and why impact on other consumers is justified by your use case.
Go into detail about your issues, please, and how this PR would fix them. How have you come to that conclusion? What tests have you run to verify that? Generally speaking, I have some regrets about ever adding the One possibility might be to let crate consumers choose their own I expect to be fully recovered by next weekend. If you have time to respond to the points I've raised by then, we may be able to get this moving again. |
@ajrcarey I really appreciate your attention to detail and concern for any user issues, but I prefer to update even if it means losing a few minutes to fix the issues that update introduces. And I think that those who don't want to update don't even deserve amazing projects like this. This is the error if I add
In my project I'm using The same happens for For now I solved it by using a local version of your wonderful project and updating the libraries and it works! |
Just to add another related failure this causes: in our case, we're using a Here's a minimum reproducer: $ cat Cargo.toml
[workspace]
members = [ "bar","foo"]
resolver = "2"
[workspace.dependencies]
pdfium-render = { version = "0.8.25", features = ["libstdc++", "static", "thread_safe"] }
chrono = { version = "0.4.38" } $ cat foo/Cargo.toml
[package]
name = "foo"
version = "0.1.0"
edition = "2021"
[dependencies]
pdfium-render.workspace = true $ cat bar/Cargo.toml
[package]
name = "bar"
version = "0.1.0"
edition = "2021"
[dependencies]
chrono.workspace = true $ cargo build
Updating crates.io index
error: failed to select a version for `chrono`.
... required by package `pdfium-render v0.8.25`
... which satisfies dependency `pdfium-render = "^0.8.25"` of package `foo v0.1.0 (/home/cristi/r/check/foo)`
versions that meet the requirements `^0.4, <=0.4.31` are: 0.4.31, 0.4.30, 0.4.29, 0.4.28, 0.4.27, 0.4.26, 0.4.25, 0.4.24, 0.4.23, 0.4.22, 0.4.21, 0.4.20, 0.4.19, 0.4.18, 0.4.17, 0.4.16, 0.4.15, 0.4.13, 0.4.12, 0.4.11, 0.4.10, 0.4.9, 0.4.8, 0.4.7, 0.4.6, 0.4.5, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.4.0
all possible versions conflict with previously selected packages.
previously selected package `chrono v0.4.38`
... which satisfies dependency `chrono = "^0.4.38"` of package `bar v0.1.0 (/home/cristi/r/check/bar)`
failed to select a version for `chrono` which could resolve this conflict |
I wish you a speedy recovery. Thanks for reply. |
Ok, thank you for all the comments. The impression I have is that the chrono dependency is the key problem. Assuming that's correct, then I propose the following:
These two changes will be implemented in the following issues respectively:
Feel free to comment there. Or, if you feel more changes need to made, please continue to comment against this PR. I do not (at this point) intend to merge the PR itself. I aim to make these changes today. This gives you time to test them (by taking |
@ajrcarey I haven't had time to try it, but I will try as soon as it's released |
The MSRV supported by chrono and image is too low, resulting in compilation failure.
@ajrcarey Thank you for your guidance.