Skip to content

Document in RF 7.5 release notes that generating standard library docs requires installing markdown #5788

Closed

Description

@mardukbp
libdoc Process Process.json

should generate Process.json. Instead, the following error occurs:

Markdown format requires 'markdown' module to be installed.

Try --help for usage information.

Activity

  1. pekkaklarck commented on Sep 17, 2026

    @pekkaklarck
    Member

    The release notes and especially issue #5709 ought to explain this

    Looking at this now, #5709 should have been labeled to be backwards incompatible and mentioned in the release notes. I'll do that soon.

  2. mardukbp commented on Sep 17, 2026

    @mardukbp
    Author

    I have several comments:

    • A minor version shouldn't break backwards compatibility
    • If JSON output now requires --doc-format ROBOT, then do it behind the scenes. Users shouldn't need to know which parameter combinations are valid and which make no sense
    • Software should be built by accretion. New features shouldn't break working features
  3. pekkaklarck commented on Sep 18, 2026

    @pekkaklarck
    Member

    I have several replies to the above comments:

    • We don't follow semantic versioning strictly. We do major backwards incompatible changes in major releases, but we allow backwards incompatible changes also in feature releases if the benefits are big enough. Due to Hyrum's law, full backwards incompatibility is not really possible anyway.
    • JSON output doesn't need --doc-format ROBOT. That tells Libdoc that the docs would use Robot's custom documentation format which isn't correct. As the result you get pretty badly formatted HTML in keyword docs. It works if you don't actually care about the docs, but then using --spec-doc-format RAW would probably be a better idea.
    • Due to the aforementioned Hyrun's law, it's in practice impossible to implement new features without making changes that break something. Benefits and problems just need to be compared.

    In this particular case the benefit for users is that standard library docs look a lot better than they used to do. As an example, see Process.Start Process in RF 7.4.2 and RF 7.5. The new syntax also looks better in the source code and is easier to maintain (RF 7.4.2, RF 7.5), which is a nice benefit for maintainers.

    The problem caused by the change is that users who want to generate standard library docs locally need to change their Robot Framework installation from

    pip install robotframework
    

    to

    pip install robotframework markdown
    

    or to use --spec-doc-format RAW if they generate specs and don't really care about the docs.

    I acknowledge the change requires users to change their workflow, but you have hard time convincing me that the problem is bigger than the benefits. You have equally hard time trying to convince me that calling this release RF 8.0 instead of RF 7.5 would have somehow made the situation better.

  4. changed the title [-]libdoc is broken in RF 7.5[/-] [+]Document in RF 7.5 release notes that generating standard library docs requires installing `markdown`[/+] on Sep 18, 2026
  5. added theissue type on Sep 18, 2026
  6. added this to the v7.5.1 milestone on Sep 18, 2026
  7. self-assigned this
    on Sep 18, 2026
  8. mardukbp commented on Sep 18, 2026

    @mardukbp
    Author

    I agree that Markdown is a better choice for the documentation and that the documentation looks better now.

    The issue is that since RF 7.5 the following command fails, saying that Markdown format requires the 'markdown' module to be installed:

    libdoc Process Process.json
    

    This error message is confusing because the output format is not Markdown. The actual problem is that when the output format is JSON the documentation is converted to HTML. When the documentation format is Markdown the 'markdown' module is required in order to convert it to HTML. This conversion can be prevented with --spec-doc-format RAW.

    The error message should tell the user that:

    • For JSON output the default --spec-doc-format is HTML
    • When the library documentation is in Markdown, the 'markdown' module is required in order to convert it to HTML

    This would be an acceptable solution for the issue I created. Unfortunately, you appropriated my issue and made it about something else. I don't appreciate that. I think it is safe to assume that people opening issues are competent and acting in good faith. Their concerns are valid and deserve to be discussed. Being a project maintainer doesn't mean you are a dictator. It means you have the honor to serve a community.

    Due to the aforementioned Hyrum's law, it's in practice impossible to implement new features without making changes that break something.

    Rich Hickey would disagree https://www.youtube.com/watch?v=oyLBGkS5ICk

  9. added a commit that references this issue on Sep 18, 2026
    7dcf1f6
  10. pekkaklarck commented on Sep 22, 2026

    @pekkaklarck
    Member

    I agree that the error message could be better in this particular case. The code that raises the error doesn't know are you creating spec file or HTML files, the latter is much more common, and the error always containing something about --spec-doc-format would thus be very confusing. Possibly the underlying code converting HTML to Markdown could get a usage argument or something similar and it then could emit a different error depending on the context. Or possibly the spec creation code could check is the markdown module installed if it is needed. If you consider this important enough, please submit an issue about that enhancement. This issue claimed that Libdoc is broken which wasn't true.

    I would also say that the default spec doc format should be changed. HTML is better than Robot's custom format, but in most cases Markdown is even better. Alternatives include:

    1. Use Markdown as the default. This is problematic if the source doc format isn't Markdown, because we either needed to convert docs to Markdown (not a trivial task) or fail. Neither are good alternatives.
    2. Use the current RAW as the default. This would work well with Markdown, but with the Robot format this would be a backwards incompatible change. Robot format has been default from the beginning, so changing how it behaves sounds like a too big change to me.
    3. Implement new format AUTO and use it as the default. It would work so that Markdown is preserved (same as RAW) and other formats are converted to HTML. Also this would be a backwards incompatible change, because it would change the default behavior when the source format is Markdown compared to how it works with RF 7.5. I would be fine doing the change in RF 7.6, though. Markdown support is new and in most cases not converting Markdown to HTML would be a good idea anyway.

    You can submit a separate issue about the above change as well.

  11. mardukbp commented on Sep 24, 2026

    @mardukbp
    Author

    I agree that the claim that libdoc is broken was false. I apologize for that. I will create an issue about improving the error message. Thank you Pekka!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions