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

update exercise's package manifest #2033

Merged
merged 5 commits into from
Feb 21, 2025
Merged

update exercise's package manifest #2033

merged 5 commits into from
Feb 21, 2025

Conversation

senekor
Copy link
Contributor

@senekor senekor commented Feb 21, 2025

scripted changes:

  • update to edition 2024
  • bring name, version, edition in customary order
  • make sure all names use underscores instead of dashes
  • add comment to dependencies section pointing to available libraries
  • apply formatting of 2024 edition

manual interventions:

  • fix crate names of all-your-base and two-fer
  • generator: update manifest template
  • fix exercises for the 2024 edition

- update to edition 2024
- bring name, version, edition in customary order
- make sure all names use underscores instead of dashes
- add comment to dependencies section pointing to available libraries
changing the crate name would break existing solutions
@senekor senekor force-pushed the senekor/tzrkutnmyxxx branch from abc9935 to 7490a05 Compare February 21, 2025 10:40
@senekor
Copy link
Contributor Author

senekor commented Feb 21, 2025

It should be noted that the 2024 edition is really new. I updated the test runner and analyzer specifically to support it. I expect that many students who are currently solving Rust exercises will not yet have Rust 1.85 installed (minimum version where edition 2024 is stable). The next exercise they download will not compile with a rather rude error message that their toolchain is outdated.

There is an argument to be made that we should wait with this until most people are probably running a recent enough toolchain.

I personally think it's good to push people to use the newest toolchain. It's just one rustup update away. The new edition has lots of changes that will improve the experience of Rust newbies, especially related to the ownership system. (temporary scopes of if let and tail expressions) If we don't update the edition, we are by default opting our students into the older, worse semantics.

@ellnix what do you think? Should we hold off on this for a little longer?

For reference, the blog post announcing Rust 2024.

Copy link
Contributor

@ellnix ellnix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since we are changing crate names to be snake_cased, we could do the same to the test file names, if you feel it's right.

I can see how a breaking change like this would be problematic, but I don't see how it will get any better if we wait. Solutions are going to break and students will have to update their tooling.

I think the only difference between doing it now and doing it at an unspecified later date is that students don't get to benefit from the new changes.

The comment on the Cargo.toml files should pretty much cut in half the volume of forum posts in Rust 😆

It might be a better idea to link to somewhere more stable than the local-registry/Cargo.toml, something like a documentation heading or maybe a forum post where we can also explain why the packages are limited. That's a minor gripe though I don't imagine that link will break anytime soon.

@senekor
Copy link
Contributor Author

senekor commented Feb 21, 2025

I think since we are changing crate names to be snake_cased, we could do the same to the test file names, if you feel it's right.

Yeah, that's a good idea. Snake case is more idiomatic for Rust. I'll do it in a separate PR.

It might be a better idea to link to somewhere more stable than the local-registry/Cargo.toml

Yeah, the link hasn't changed since I got involved and I don't see a reason why it would. I'm also not aware of documentation that would be better to link to.

@senekor senekor merged commit d9a34dc into main Feb 21, 2025
10 checks passed
@senekor senekor deleted the senekor/tzrkutnmyxxx branch February 21, 2025 22:56
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

Successfully merging this pull request may close these issues.

2 participants