-
Notifications
You must be signed in to change notification settings - Fork 545
Update dependencie rand to 0.9 on simple-cipher #2055
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
|
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
|
Ran across the same thing myself but that was before The reason the CI workflow is failing is because of the large change in rand from 0.8 to 0.9 is breaking I'll let you fix it if you want to take this PR through yourself, otherwise if you don't have the time I can fix it for you. |
|
I had assumed that Maybe it's better to have |
Wouldn't that break example.rs and therefore CI every time rand has breaking changes? |
Yes, but broken CI is better than confused students. (or even failing tests because of mismatched version, although that doesn't seem to be the case here, which confuses me) |
But there would also be the issue that Edit: I think it might make sense to add an instructions append file telling the student to check the
I just investigated it and it looks pretty straightforward, there are a bunch of crates that depend on rand 0.8.5 which is why it's being pulled in, if you just do a search for I confirmed locally that removing the crates that depend on rand 0.8 from Cargo.toml and generating Cargo.lock causes the runner to error on a rand 0.8 solution. |
The dependencies of the test runner are updated with dependabot, so the time frame where users might pull in newer versions should be minimal. But it wouldn't be great if it happens. What if we had some CI check that made sure the dependencies in the exercise definitions match the available ones in the test runner? (I lowkey wish exercism had a monorepo, coordinating changes between all the disparate repos is no fun.)
Ah, that makes sense! Forgot to consider that transitive dependencies are also available. Thanks for checking. |
It should be relatively easy, it can even be a string comparison. I presume that git submodules are a no-go considering the lengths we go to with symlinking problem-specifications? If we used a git submodule of I expect we are much more likely to run into cases of an update of dependencies causing a regression rather than an update to an exercise adding a dependency that doesn't exist, so I think whatever we decide on belongs on the CI of |
Not quite, problem-specifications is a special case because As a small aside, I'm using jj as vcs instead of git, which doesn't really support submodules. (It ignores them, so I have to drop down to git commands to keep submodules in sync.) Not a big deal, but I prefer no submodules unless there's a tangible benefit. A submodule also doesn't really make sense here in my opinion, because we always want to check the latest commit of the other repo. There's no point in pinning an old version. Whenever we run the check, we need to clone / fetch the latest commit anyway. CI check on the test runner repo seems like a good idea. Only when pushing to the main branch, so we get notified when we need to update the track as well. The test runner has to be updated first, so we can't block those updates by the check. |
|
Created an issue on the test runner repository, so we can continue the discussion there since it's off topic here. |
rename rand deprecated functions
1edd818 to
fbae7bc
Compare
Sure, thanks for the opportunity! I fixed what was wrong and made sure it's work local. I also changed the commit message to be "exercise_name: change" trying to make it similar to the others commits. I understand that i don't have to touch anything else (and that the |
senekor
left a comment
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.
Thanks!
On simple-cipher, we can update the
randversion to the latest version because the new version has several function name changes that, if you don't realize that you are looking at the wrong version of the doc, give meaningless errors likeexpected function, found module 'rand::rng'ormodule 'rng' is private(and it's even worse if you are looking at the rust-rand-book, because it doesn't say the version anywhere).I saw that the rust-test-runner already updated the
randto 0.9 and I checked that it works by adding a solution with that version.