DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
719 stars 254 forks source link

Compiler/runner version should be associated to executable #2536

Open eldering opened 4 months ago

eldering commented 4 months ago

Currently the compiler and runner version are part of the language table, but they are directly related to the compiler executable associated to the language, not the language itself. Thus, they should also be stored there.

vmcj commented 4 months ago

I think I agree but I would prefer to keep the display on the language page (also).

meisterT commented 4 months ago

I disagree.

A change in executable will not change the compiler/runner versions.

You need to change the chroot to change the versions instead. That's why the version table stores this info per langid and judgehostid. It then get's promoted to the language table when marked as canonical.

For more context, see https://github.com/DOMjudge/domjudge/issues/1241 (which I incidentally picked up a few days ago).

eldering commented 4 months ago

A change in executable will not change the compiler/runner versions.

You need to change the chroot to change the versions instead. That's why the version table stores this info per langid and judgehostid. It then get's promoted to the language table when marked as canonical.

Well, that's also true. But if I change the executable for language C++ from c++-with-gcc to c++-with-clang, then I will definitely get a different compiler version too. So I think that this is more directly related to executable than language. I do agree though that we should show it at the language level.

meisterT commented 4 months ago

For that my plan is to follow the spec (see https://ccs-specs.icpc.io/draft/contest_api#languages) and add compiler and runner fields in the language table. Then these will be passed to and can be used by the executable scripts as variables.