Skip to content

docs: not all plantuml types supported #415

Closed

Description

@AlexanderLanin

Currently PlantUML works fine in docs. But not all diagram types are working.
Reference: #374 (comment)

The reason is, that the diagram types we tested so far do not require dot.
But others rely on dot.
Reference: https://chatgpt.com/share/67b46957-d804-800a-aedd-b148068caab9

Task:

  • Add example diagram
  • Ensure that it is working
  • Hint: add dot via bazel

Activity

  1. MaximilianSoerenPollak commented on Feb 19, 2025

    @MaximilianSoerenPollak
    Contributor

    A bit weird (in the GPT summary) as the diagramms in the UML functions #414 also create class diagramms, but I never gotten an Error.

    I guess easiest would be to just add it via bazel, so that all diagramms no matter which engine is used, and also legaycy diagramms, are supported.

  2. added this to the milestone on Feb 24, 2025
  3. dcalavrezo-qorix commented on Mar 5, 2025

    @dcalavrezo-qorix
    Contributor

    There are some alternative engines https://plantuml.com/elk

    The problem is that there are no precompiled binaries available to download.
    The solution would be to build the packages ourselves, but that doesn't make a lot of sense in the context of the score repo, but in the context of the bazel registry repo.

  4. dcalavrezo-qorix commented on Mar 5, 2025

    @dcalavrezo-qorix
    Contributor

    No archive from the releases contain the linux binaries

    In theory we should have the following bazel binary linked which we could pass to the planuml jar when invoked

    +
    +http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
    +
    +http_archive(
    +    name = "graphviz",
    +    urls = ["https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/10.0.1/graphviz-10.0.1.tar.gz"],
    +    strip_prefix = "graphviz-10.0.1",
    +    build_file_content = """
    +package(default_visibility = ["//visibility:public"])
    +
    +sh_binary(
    +    name = "dot_bin",
    +    srcs = ["bin/dot"],
    +    visibility = ["//visibility:public"],
    +)
    +    """,
    +)
    
  5. AlexanderLanin commented on Mar 5, 2025

    @AlexanderLanin
    MemberAuthor

    @dcalavrezo-qorix Have you already tried it? Does graphviz/dot have dependencies itself?

    @ltekieli Can you please have a look above to see whether that's the right approach? And the correct goal? Usually, graphviz/dot is installed via apt. See also https://gitlab.com/graphviz/graphviz/-/releases

  6. ltekieli commented on Mar 6, 2025

    @ltekieli
    Member

    @AlexanderLanin I'd start with adding the installation with apt in GH actions, and after that explore how this could be added via bazel.

  7. AlexanderLanin commented on Mar 6, 2025

    @AlexanderLanin
    MemberAuthor

    That's quite true, we could make a hotfix in score. Here we are already looking into how to do that properly with bazel.

  8. AlexanderLanin commented on Mar 6, 2025

    @AlexanderLanin
    MemberAuthor

    In theory we should have the following bazel binary linked which we could pass to the planuml jar when invoked

    It seems http_archive has a build_file parameter. So this might be a slight variation, no idea whether thats better or not.

    http_archive(
        name = "graphviz",
        urls = ["https://gitlab.com/graphviz/graphviz/-/archive/stable_release_9.0/graphviz-stable_release_9.0.tar.gz"],
        strip_prefix = "graphviz-stable_release_9.0",
        build_file = "//third_party:BUILD.graphviz",
    )

    BUILD.graphviz:

    package(default_visibility = ["//visibility:public"])
    
    filegroup(
        name = "dot_binary",
        srcs = ["bin/dot"],
    )

    And in plantuml something like:

        args = ["-graphvizdot", "$(location @graphviz//:dot_binary)"],
        data = ["@graphviz//:dot_binary"],
    
  9. hoe-jo commented on Mar 6, 2025

    @hoe-jo
    Contributor

    @AlexanderLanin A hotfix would be great we would need it for our architecture process for the upcoming audit

  10. 14 remaining items

  11. added a commit that references this issue on Mar 11, 2025
    cfb5256
  12. added a commit that references this issue on Mar 11, 2025
    b060715
  13. AlexanderLanin commented on Mar 11, 2025

    @AlexanderLanin
    MemberAuthor

    dot installation is now manual and mandatory. see development guide.

  14. LittleHuba commented on Mar 12, 2025

    @LittleHuba
    Contributor

    Issue in CI persists.
    Rebuild of #374 shows same error.

  15. dcalavrezo-qorix commented on Mar 12, 2025

    @dcalavrezo-qorix
    Contributor

    @LittleHuba you don't execute the latest workflow

          - name: Install Graphviz
            run: sudo apt update && sudo apt install -y graphviz
    
  16. AlexanderLanin commented on Mar 12, 2025

    @AlexanderLanin
    MemberAuthor

    Docs are build from the PR-branch. You'll need to rebase to main or merge main into your branch.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions