metacpan-web icon indicating copy to clipboard operation
metacpan-web copied to clipboard

Some perldelta Pod L<> links go to wrong distribution version

Open Smylers opened this issue 3 years ago • 7 comments

perl-5.36.0-RC2 is out. Its perldelta links to new and changed features. Sometimes MetaCPAN links to the feature within this release candidate (which is useful); sometimes MetaCPAN instead links to the equivalent documentation within the current stable version of perl (which is not).

This seems to be MetaCPAN rendering issue, because the Pod source links in the same way in both cases. For instance:

Working: In the -g command-line flag section, the “see "-g" in perlrun” is L<perlrun/-g> in the Pod source, and as expected links to https://metacpan.org/pod/release/RJBS/perl-5.36.0-RC2/pod/perlrun.pod#-g.

Not Working: In the iterating over multiple values at a time section, the “see "Compound Statements" in perlsyn” is L<perlsyn/Compound Statements> in the Pod source, yet links to the unversioned https://metacpan.org/pod/perlsyn#Compound-Statements, which is from the stable v5.34.1 distribution, not the release candidate. As such, it doesn't contain the information being linked to.

This might be related to Issue #1498, though that is about different distributions providing files with the same name, and this case is different versions of the same distribution.

Smylers avatar May 21 '22 06:05 Smylers

This is not a bug. It's not a stable release, so new documentation pages and sections are not indexed for linking. Since documentation doesn't have PAUSE namespacing it has to rely on metacpan to index the stable version of it.

Grinnz avatar May 21 '22 06:05 Grinnz

If you want the links to work as in an installed distribution, the RC is now on perldoc.perl.org: https://perldoc.perl.org/5.36.0-RC2/perldelta

Grinnz avatar May 21 '22 06:05 Grinnz

This is not a bug.

Thank you for such a speedy reply. It seems like a bug, in the sense that there's a page on MetaCPAN which contains links and those links don't go to the intended places.

It's not a stable release, so new documentation pages and sections are not indexed for linking. Since documentation doesn't have PAUSE namespacing it has to rely on metacpan to index the stable version of it.

That makes sense. Why does the -g link work then? Oh, because there hasn't been a perlrun/-g target in any stable release yet?

Obviously it wouldn't be good to index a dev release and have other distributions linking into it. But couldn't a dev release be rendered such that self-links prefer that version over the stable destination for that link which other dists would link to?

If you want the links to work as in an installed distribution, the RC is now on perldoc.perl.org: https://perldoc.perl.org/5.36.0-RC2/perldelta

Thanks; I didn't know about that.

Smylers avatar May 21 '22 06:05 Smylers

This is a bug. Links to modules in the same distribution are meant to use versioned links to the same release. I'm not sure why it is working for some links and not for others. I'll look into it.

haarg avatar May 21 '22 15:05 haarg

I believe this will be fixed by metacpan/metacpan-api#1053.

haarg avatar May 21 '22 18:05 haarg

This should be fixed now.

haarg avatar May 22 '22 14:05 haarg

Seems to be an issue for https://metacpan.org/release/WOLFSAGE/perl-5.37.1/view/pod/perldelta.pod (the link to perl5370delta does not go to the same distribution)

Grinnz avatar Jun 21 '22 23:06 Grinnz