From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9D223858427; Wed, 17 Apr 2024 14:18:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9D223858427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713363520; bh=T+S1zdrwAY9NqPdH6wiaX4n5aTLc+m61JEvf5lkFqKY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NCqjt/nO8xUHTOnPVLi7UsMWSUvv6CIkufLCqAe/hCiIZ+JOn3lUEjAhIsL/Ltc/g +ZwWYYgQQ51m3N6rPJ/wn91Rl5q1azjphyJqSqietOz1Ybcyd4r/WnP2nyt5U7DlE9 eb6PqSDx8FPuyBsoEN2OnLU7q4LB0gFLetSqgNuM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/114738] [14 Regression] Default DOCUMENTATION_ROOT_URL vs. release branches Date: Wed, 17 Apr 2024 14:18:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114738 --- Comment #5 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:57056146f4ffc5ea347c03e37e1e2c7cd99261d0 commit r14-10007-g57056146f4ffc5ea347c03e37e1e2c7cd99261d0 Author: Jakub Jelinek Date: Wed Apr 17 16:17:22 2024 +0200 DOCUMENTATION_ROOT_URL vs. release branches [PR114738] Starting with GCC 14 we have the nice URLification of the options print= ed in diagnostics, say for in test.c:4:23: warning: format =C3=A2%d=C3=A2 expects argument of type = =C3=A2int=C3=A2, but argument 2 has type =C3=A2long int=C3=A2 [-Wformat=3D] the -Wformat=3D is underlined in some terminals and hovering on it shows https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat link. This works nicely on the GCC trunk, where the online documentation is regenerated every day from a cron job and more importantly, people rare= ly use the trunk snapshots for too long, so it is unlikely that further changes in the documentation will make too many links stale, because users will simply regularly update to newer snapshots. I think it doesn't work properly on release branches though. Some users only use the relased versions (i.e. MAJOR.MINOR.0) from tarb= alls but can use them for a couple of years, others use snapshots from the release branches, but again they could be in use for months or years and the above mentioned online docs which represent just the GCC trunk might diverge significantly. Now, for the relases we always publish also online docs for the release, which unlike the trunk online docs will not change further, under e.g. =20=20=20 https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wf= ormat or =20=20=20 https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wf= ormat etc. So, I think at least for the MAJOR.MINOR.0 releases we want to use URLs like above rather than the trunk ones and we can use the same proc= ess of updating *.opt.urls as well for that. For the snapshots from release branches, we don't have such docs. One option (implemented in the patch below for the URL printing side) is point to the MAJOR.MINOR.0 docs even for MAJOR.MINOR.1 snapshots. Most of the links will work fine, for options newly added on the release branches (rare thing but still happens) can have until the next release no URLs for them and get them with the next point release. The question is what to do about make regenerate-opt-urls for the relea= se branch snapshots. Either just document that users shouldn't make regenerate-opt-urls on release branches (and filter out *.opt.urls changes from their commits), add make regenerate-opt-urls task be RM responsibility before making first release candidate from a branch and adjust the autoregen CI to know about that. Or add a separate goal which instead of relying on make html created files would download copy of the html files from the last release from web (kind of web mirroring the https://gcc.gnu.org/onlinedocs/gcc-14.1.0/ subtree locall= y) and doing regenerate-opt-urls on top of that? But how to catch the point when first release candidate is made and we want to update to what will be the URLs once the release is made (but will be stale URLs for a week or so)? Another option would be to add to cron daily regeneration of the online docs for the release branches. I don't think that is a good idea thoug= h, because as I wrote earlier, not all users update to the latest snapshot frequently, so there can be users that use gcc 13.1.1 20230525 for mont= hs or years, and other users which use gcc 13.1.1 20230615 for years etc. Another question is what is most sensible for users who want to override the default root and use the --with-documentation-root-url=3D configure option. Do we expect them to grab the whole onlinedocs tree or for rel= ease branches at least include gcc-14.1.0/ subdirectory under the root? If so, the patch below deals with that. Or should we just change the default documentation root url, so if user doesn't specify --with-documentation-root-url=3D and we are on a release branch, defaul= t that to https://gcc.gnu.org/onlinedocs/gcc-14.1.0/ or https://gcc.gnu.org/onlinedocs/gcc-14.2.0/ etc. and don't add any infix= in get_option_url/make_doc_url, but when people supply their own, let them point to the root of the tree which contains the right docs? Then such changes would go into gcc/configure.ac, some case based on "$gcc_version", from that decide if it is a release branch or trunk. 2024-04-17 Jakub Jelinek PR other/114738 * opts.cc (get_option_url): On release branches append gcc-MAJOR.MINOR.0/ after DOCUMENTATION_ROOT_URL. * gcc-urlifier.cc (gcc_urlifier::make_doc_url): Likewise.=