-
Notifications
You must be signed in to change notification settings - Fork 13
Update dependency tree and raise MSRV to 1.79 #235
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
Conversation
This commit updates the dependency tree to pull in the latest versions of all the dependencies which were now out of date. The exception is dev dependencies aren't update and also ra_ap_limit is held to 0.0.229 because newer releases require rust >= 1.80.0 which is higher than Qiskit >2.0's MSRV of 1.79. Accordingly this commit updates the MSRV to 1.79 to make sure there aren't any compatibility issues with older versions of Rust.
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'm not certain I quite got the motivation for raising the MSRV if we don't need 1.70 within this package, but I also don't have a problem shifting it to match Qiskit.
let offset = span.start; | ||
Report::build(ReportKind::Error, file_path, offset) | ||
// .with_code(3) | ||
Report::build(ReportKind::Error, (file_path, span.clone())) | ||
.with_code(3) |
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 seems like a behavioural change?
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 wasn't sure, I looked through the ariadne docs at the time I wrote this and I thought that it should work the same, but I might have screwed it up. It's been a busy few weeks so I don't remember the details
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.
Oh, I realise there's two changes highlighted. I just meant the commented-out .with_code
got added back. I was assuming the other change was part of the upgrade.
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 verified that the ariadne API has changed, so that the previous line errors. I looked in the docs as well, but was unable to find a concrete example of the new code. It looks like it might be this trait implementation; it's the only tuple argument that I find. My guess is that this preserves behavior.
[In a suggestion below, I removed the comments that are obsoleted by this change]
I think I can probably roll it back, I think the only thing actively requiring 1.79 are some of the rust-analyzer dependencies. I just figured while I was doing this it's better to sync the MSRV to avoid building multiple versions of dependencies if possible. |
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'm a bit confused on the discussion regarding the MSRV. The reasonable thing is to raise it as high as necessary, but no higher. But apparently it's more complicated than that. Maybe determining the minimum version is too much work.
I'll pull this and build it, since it looks like some of the rationale behind changes has been lost in the mists of time.
@@ -361,7 +361,7 @@ where | |||
_ => ascii_check(c, mode.characters_should_be_ascii()).map(Into::into), | |||
}; | |||
let end = src.len() - chars.as_str().len(); | |||
callback(start..end, res.map(Into::into)); | |||
callback(start..end, res); |
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 see this is in your commit messages. I assume this is clippy and/or rustc that requires this change, right? And adding parens in a logic expression below, etc.
@@ -76,7 +76,7 @@ impl Input { | |||
// } | |||
pub(crate) fn is_joint(&self, n: usize) -> bool { | |||
let (idx, b_idx) = self.bit_index(n); | |||
self.joint[idx] & 1 << b_idx != 0 | |||
self.joint[idx] & (1 << b_idx) != 0 |
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 see that clippy asked for this. My recollection is that if I added parens for clarity, clippy would say to remove them because they are not semantically necessary. But this looks like the opposite.
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.
It's a new rule in Rust 1.86 they recommend using explicit paren because the precedence of bitwise operations isn't as widely known: https://rust-lang.github.io/rust-clippy/rust-1.87.0/index.html#precedence_bits
Rust 1.86 is relatively new only a couple of months old.
I was unable to get If this update reduces potential burden on development of Qiskit, I am ok with it. |
This commit updates the dependency tree to pull in the latest versions of all the dependencies which were now out of date. The exception is dev dependencies aren't update and also ra_ap_limit is held to 0.0.229 because newer releases require rust >= 1.80.0 which is higher than Qiskit >2.0's MSRV of 1.79. Accordingly this commit updates the MSRV to 1.79 to make sure there aren't any compatibility issues with older versions of Rust.