Skip to content

:program: in sphinx doesn't link #8438

Closed

Description

@faho

With @floam's recent work, we're now trying to use more semantic markup. That's cool.

Unfortunately, while :envvar: links to the definition of the corresponding envvar, I can't see :program: do the same.

I think the actual syntax to define a program section is:

.. program:: name

with the double colons and the space after them (at least emacs' sphinx mode doesn't highlight them if that's not added). Some of the definitions lack spaces or don't exist (e.g. echo doesn't have a program definition).

Whether with that, or without, I can't see e.g. the link from return in https://github.com/fish-shell/fish-shell/blob/master/doc_src/commands.rst#keywords working.

In addition, all of the links to fish_add_path are broken because they still use the label, which has now been removed.

If we can't figure out how to make it link, we should revert to using normal :ref: links again.

Note: This should block a 3.4 release

Activity

  1. added
    docs
    regression
    on Nov 12, 2021
  2. added this to the fish 3.4.0 milestone on Nov 12, 2021
  3. faho commented on Nov 12, 2021

    @faho
    MemberAuthor

    Okay, I've now replaced the references that should be linked with :ref: again since it wasn't as much as I thought. I kept the program:: definitions in place and kept the :program: roles for the program's own man page - realpath doesn't have to link to the realpath page inside the realpath page.

    If we can make :program: work, we can switch easily by removing the cmd- labels, completely rebuilding the docs (i.e. you'll have to remove your old copy!) and seeing where it complains about the label not existing. That makes it easy to find all places a label is used.

  4. krobelus commented on Nov 12, 2021

    @krobelus
    Contributor

    We previously rejected the idea to treat warnings as errors (sphinx-build -W) - I don't remember why and I can't find that discussion now. Maybe at least in the CI or in Debug builds?

  5. faho commented on Nov 12, 2021

    @faho
    MemberAuthor
    1. The issue with -Werror style things remains - different compiler version, different warnings. Our CI runs on Ubuntu, so the version you get is, uh, not super up-to-date.
    2. This would not help with the :program: issue, only the missing labels.
  6. added a commit that references this issue on Dec 12, 2021
  7. locked as resolved and limited conversation to collaborators on Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsregression

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions