Skip to content

grading: add 2021 and 2024 editions of rust - #1749

Open
pobrn wants to merge 1 commit into
cms-dev:mainfrom
pobrn:rust_2024
Open

pobrn wants to merge 1 commit into
cms-dev:mainfrom
pobrn:rust_2024

Conversation

@pobrn

@pobrn pobrn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Just like the C and C++ languages have multiple standard versions, rust has editions, so add the latest two ones as two separate languages.

Note, that this removes the old, unversioned, "Rust" language option.

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.56%. Comparing base (e16e4df) to head (a514f7d).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
cmstestsuite/Tests.py 0.00% 2 Missing ⚠️
cms/grading/languages/rust.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1749   +/-   ##
=======================================
  Coverage   57.55%   57.56%           
=======================================
  Files         344      344           
  Lines       28374    28379    +5     
=======================================
+ Hits        16332    16335    +3     
- Misses      12042    12044    +2     
Flag Coverage Δ
functionaltests 0.00% <0.00%> (ø)
unittests 57.56% <81.25%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pobrn

pobrn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

The CI logs mention numerous "internal server error". Where can one see the cms log output?

@veluca93

Copy link
Copy Markdown
Contributor

The CI logs mention numerous "internal server error". Where can one see the cms log output?

I don't think you can easily see that from the CI.

@prandla

prandla commented Nov 20, 2026

Copy link
Copy Markdown
Member

The CI logs mention numerous "internal server error". Where can one see the cms log output?

the hack I usually use is to edit docker/_cms-test-internal.sh and change the -v to -vvv. This will cause cmsRunFunctionalTests to print the logs of each service on stdout. that is a bit annoying though, yeah, sorry :(

The problem seems to be that your languages' .name returns "Rust (2021)", not "Rust 2021". The readable names in setup.py aren't actually used for anything; maybe we should change it to throw an error on mismatches...

for what it's worth, i think it would also be "more pythonic" to use subclasses here instead of this kind of class factory.

also, i'd personally name the languages more explicitly "Rust (2021 edition)" etc. I don't think that's too long, "Python 3 / CPython" is about the same length, and it's a bit clearer IMO

@pobrn

pobrn commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

The problem seems to be that your languages [...]

Ooops, right.

also, i'd personally name the languages more explicitly "Rust (2021 edition)" etc.

I made that change now, but note that now the language name is effectively in "English", instead of just naming the technologies (which are more or less "universal names"). In my mind it's similar to doing "C++ (2020 standard)" instead of the current "C++20". I don't mind either way, just wanted to note this.

i think it would also be "more pythonic" to use subclasses here instead of this kind of class factory.

I can for sure make that if you want?

@pobrn

pobrn commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Ahh, of course debian bookworm's rustc is too old for the 2024 edition.

@pobrn

pobrn commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Any ideas?

  1. switch to debian 13 (trixie), or
  2. have the tests check the availability (somehow?) and skip unavailable languages

@gollux

gollux commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

I think we should switch to Trixie in our tests. Could you please submit a PR?

@pobrn

pobrn commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

I did create #1753, but unfortunately ubuntu needs to be updated as well. If that's not acceptable, then I'll drop the 2024 edition from this PR (and have them as out of tree patches).

Just like the C and C++ languages have multiple standard versions,
rust has editions, so add the latest two ones as two separate
languages.

Note, that this removes the old, unversioned, "Rust" language option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants