question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PlantUML doesn't draw association between class and enum when a note is present

See original GitHub issue

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug

I met a peculiar behavior while utilizing your wonderful functionality or rendering PlantUML diagrams.

For some reason, when I try to create an association between a class field and enum related to it, if said enum has a note attached to it’s member, the association isn’t there.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://app.diagrams.net/
  2. Click on Arrange => Insert => Advanced => PlantUML
  3. Insert the following PlantUML diagram:
@startuml

enum Foo {
    Bar
}

note left of Foo::Bar
    Buggy note
end note

class Buzz {
    foo: Foo
}

Buzz::foo --> Foo

@enduml
  1. See the error

Expected behavior

As displayed by plantuml.com, the association needs to be visibly rendered.

Screenshots

draw.io result: image

plantuml.com result: image

draw.io version (In the Help->About menu of the draw.io editor):

  • 19.0.0

Desktop (please complete the following information):

  • OS: Manjaro Linux
  • Browser Brave
  • Version 1.39.111 Chromium: 102.0.5005.61 (Official Build) (64-bit)](https://brave.com/latest/)

Additional context

I suspect some dependency update are due on your server side, since I have at the moment no means to confirm how standalone installation behaves but considering that official implementation does work okay that seems to be precisely the case.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
m-mohamedincommented, Jul 14, 2022

The issue is fixed. We are now on version 1.2022.6 of PlantUml

0reactions
AlexTalkercommented, Jul 2, 2022

This seems to be the result of regression, according to https://github.com/plantuml/plantuml/issues/983 But still, it’s odd that official PlantUML server uses GraphViz from 2014, I wanted to debug the issue by downgrading GraphViz earlier before I went to PlantUML’s bug-tracker, and for distros like Arch it’s such a pain to find such an ancient version for the dependency. Also, I’ve checked on PlantUML release in-between:

# plantuml -version
PlantUML version 1.2022.4 (Sat Apr 09 13:29:17 GMT 2022)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US

PLANTUML_LIMIT_SIZE: 4096

Dot version: dot - graphviz version 4.0.0 (0)
Warning : cannot determine dot version

The issue seems to be fixed for the following diagram:

@startuml BrokenSVG

class User {
  email: String
  username: String
  password: String
}

note right of User::username {
  This breaks connections
}

class Role {
  email: String
  name: String
}

User -- Role
Role -- Role

@enduml

PNG: BrokenSVG

SVG: BrokenSVG

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class Diagram syntax and features - PlantUML
PlantUML class diagram syntax: You can define interfaces, members, relationships, packages, generics, notes... Changing fonts and colors is also possible.
Read more >
1.2022.2 regression: SVG does not include connections if ...
Problem When using note elements, the rendered SVGs don't render ... PlantUML doesn't draw association between class and enum when a note is...
Read more >
PlantUML Language Reference Guide
The sequence -> is used to draw a message between two participants. Participants do not have to be explicitly declared. To have a...
Read more >
PlantUML Language Reference Guide
That does not change the drawing, but may improve readability. ... By default, links between classes have two dashes -- and are vertically...
Read more >
UML class diagram enum - Stack Overflow
Enumerations actually work more like Datatypes than Classes in UML, so typically Associations aren't shown any more than they would be if you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found