compiler-explorer
compiler-explorer copied to clipboard
[REQUEST]: Short and full links referencing "latest released version" of a compiler
Is your feature request related to a problem? Please describe
I would like the ability for short and full links to use the "latest released version" of a compiler (whatever that version may be) instead of fixing a compiler version or using a potentially unstable trunk version: "x86-64 gcc (latest)" instead of "x86-64 gcc 13.2" or "x86-64 gcc (trunk)".
This feature would be very helpful in links to examples and exercises included in programming/engineering courses, especially introductory courses where program output very rarely, if ever, changes based on compiler version. And that saves both instructors and students significant effort and confusion.
The current approach of choosing a specific compiler version requires links to be updated just because the compiler version changes, which happens fairly frequently, but the courseware does not change as frequently.
Lastly, the current approach leaves links to older version, say GCC 12.1, and unnecessarily the impression that material may be outdated though compiler version has no bearing on the material. There is a lot of value in students seeing examples and exercises use the latest compiler version, most important being confidence in the instructor as well as their own self esteem.
Describe the solution you'd like
This feature relates only to links to CE sessions, and thus the easiest/obvious way is to add a new checkbox field to the "Share" dropdown which if checked would force the link resolver to choose the "latest released version" of the compiler instead of the specific version of the compiler that was selected when the link was created.
An optimization can be that the new checkbox field is available only if the currently selected compiler is the latest released version.
An alternative is to add an entry such as "x86-64 gcc (latest)" to the list of compilers just above the latest released version such as "x86-64 gcc 13.2". Then, when a link is created, the link would ask the link resolver to use the latest release version if the "latest" compiler entry is selected at link creation.
In the alternative approach, the Share dropdown would not need any change, but there would be one redundant compiler entry in each compiler grouping.
Describe alternatives you've considered
There is presently no means to obtain the desired effect.
Additional context
This feature was first proposed and discussed on Mastodon: https://hachyderm.io/@smurthys/111830069635303634
It'd probably make sense to add latest entries for all compilers, like the trunk entries, that are automatically bumped. Doing it from the short/full link step strikes me as much harder.