Since java 21 we often receive the warnings: "source value 8 is obsolete and will be removed in a future release" "target value 8 is obsolete and will be removed in a future release" Presently these values are handled in the ebuild by setting: DEPEND=">=virtual/jdk-1.8:*" RDEPEND=">=virtual/jre-1.8:*" Whenever a new java version in ::gentoo drops a source / target value these ebuild settings need to be updated. For java 11 we had to update from 1.5 [1] For java 17 we had to update from 1.6 For java 21 we had to update from 1.7 Soon we'll have to update from 1.8 In order to avoid such unnecessary updates these values should be set in a central place, overwritable in the ebuild. [1] https://marc.info/?l=gentoo-dev&m=161838633318104
this would handle only part of the issue. the other part is that a change in eclass won't trigger rebuild of all affected ebuilds to generate bytecode with a higher version. that's why we need to bump all the ebuilds manually, to trigger the rebuild. at least i don't know about any other way.
Guess an important part in the game is 'eselect java' and each java version has its own set of source / target values supported. Not sure, do (or could?) we set source / target according to the (e)selected system-vm? SOURCE and TARGET are registered in package.env for each package. Could these values be evaluated when changing the system-vm to trigger the rebuild? This is more questions than answers, I know.