Possible bug in nwdiag

0 votes
asked Sep 20, 2021 in Bug by zenologia (120 points)

If I try to view the following script, I get a misaligned connection between backend and db. Am I missing something?

Thank you.

@startuml
nwdiag {

  network {
    web;
    backend;
  }

  backend -- db;
}
@enduml

commented Sep 20, 2021 by The-Lu (37,800 points)

Hello Z.,

Yes, this is a bug.

See possible workaround and all the combination:

CodeOutput
@startuml
nwdiag {

  network {
    web;
    backend;
  }

  backend -- db;
}
@enduml
@startuml
nwdiag {

  network {
    backend;
    web;
  }

  backend -- db;
}
@enduml
@startuml
nwdiag {

  network {
    a;
    b;
    backend;
    web;
  }

  backend -- db;
}
@enduml

See also, this first issue with the new newdiag engine:


Regards,
Th.

commented Sep 20, 2021 by The-Lu (37,800 points)

Hello Z.,

Here are some another workarounds:

CodeOutput
@startuml
nwdiag {
  web[shape = cloud];
  network {
    web
    backend
  }
  backend -- db;
}
@enduml
@startuml
nwdiag {
  web [shape = cloud];
  web -- frontend
  network {
    frontend
    backend
  }
  backend -- db;
}
@enduml

If that can help,
Regards,
Th.

1 Answer

0 votes
answered Sep 21, 2021 by plantuml (265,020 points)

Thanks for the report.

This has been fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server.

Tell us if you find other issues !

Regards,

commented Sep 22, 2021 by The-Lu (37,800 points)

Hello PlantUML team,

Here is a stretched example (maybe to change):

@startuml
nwdiag {
  network {
    a;
    b;
    c;
  }
  a -- 1
  b -- 2
  c -- 3
}
@enduml

Regards,
Th.

...