qjebbs / vscode-plantuml

Rich PlantUML support for Visual Studio Code.
MIT License
1.09k stars 156 forks source link

PlantUML server is mandatory #255

Open rspielmann opened 5 years ago

rspielmann commented 5 years ago

It seems like since v 2.11.3 it is mandatory to configure a rendering server. I am unable to use the locally installed PlantUML, even though the render policy is set to "local".

rspielmann commented 5 years ago

Related to this commit?

https://github.com/qjebbs/vscode-plantuml/commit/c37ac957d5bad5fcfbac6e880bee129339eac9a7

rspielmann commented 5 years ago

Environment:

Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:17:25.463Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 4.15.0-58-generic
qjebbs commented 5 years ago

Cannot reproduce, if render set to Local, 'server' doesn't used at all, except markdown rendering, which is force to use Server render.

bed415 commented 5 years ago

I have the same issue with v2.11.3 and v2.12.0.

Environment:

Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:16:34.800Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0

I am using default configuration for the plugin :

"plantuml.server": "",
"plantuml.render": "Local",

In the preview, I get the following message :

:danger:No PlantUML server, specify one with “plantuml.server”.

When I revert back to v2.11.2, it works again as before with the same configuration.

qjebbs commented 5 years ago

@bed415 Preview of what, markdown or diagram? It's expected you get this when preview markdown, follow the tip, specify your server.

See also: https://github.com/qjebbs/vscode-plantuml#notice

qjebbs commented 5 years ago
image
korthout commented 5 years ago

Same problem here.

@qjebbs For me it happens in Preview of markdown file with PlantUML diagram. Plantuml is not rendered but its source is shown with a warning at the top:

:danger:No PlantUML server, specify one with “plantuml.server”.

qjebbs commented 5 years ago

@korthout Yes, it's expected, follow the tip, specify your server.

qjebbs commented 5 years ago

To All: The server is mandatory for markdown rendering all the time, no matter the latest version or the past ones. The only difference is the removing of default value, for privacy reasons.

You can sill use the official server if you don't have your own:

{ 
   "plantuml.server": "https://www.plantuml.com/plantuml"
}

But you're asked to do the configuration Explicitly, which means you know what is going on.

See also: https://github.com/qjebbs/vscode-plantuml#notice

rspielmann commented 5 years ago

I understand that a default value for the server no longer exists. But I did expect that during markdown preview, when rendering is set to "Local", it would still use the local plantuml installation. Because it doesn't do that (it apparently forces me to use a plantuml server for markdown preview), I opened this issue. So maybe I've misunderstood the "Render" option today. @qjebbs are you saying that plantuml rendering in markdown preview ALWAYS uses a server for rendering and that is has always been like that in the past?

qjebbs commented 5 years ago

@rspielmann To your last concern, see https://github.com/qjebbs/vscode-plantuml/issues/247. And yes, the markdown integration is always relies on server.

bed415 commented 5 years ago

@qjebbs thanks for your explanations. What I thought was a regression is actually a nice bug fix improving security and privacy. Before that, my data was sent to the default server without me knowing. I don't fully understand the constraints you explained in #247, but anyway thank you for your nice work with this extension.

qjebbs commented 5 years ago

@bed415 You're welcome😀

musiKk commented 4 years ago

So sorry for digging this out again: Is it very difficult to rework this to have the Markdown integration in the same manner as for standalone files with local mode? Because sending our diagrams to an external party is indeed a privacy concern for us. In that sense I totally agree with @bed415. I will check out running a server locally but I'm also of the opinion that this creates a bigger barrier to entry for checking out this otherwise awesome tool and extension.

qjebbs commented 4 years ago

@musiKk Setup your own server if you have privacy concerns

aniongithub commented 4 years ago

I ran into this issue and ran a local server using Docker

uuf6429 commented 4 years ago

To All: The server is mandatory for markdown rendering all the time, no matter the latest version or the past ones. The only difference is the removing of default value, for privacy reasons.

This isn't mentioned anywhere in the readme (which is perhaps a better place than in an issue)...

sbalousek commented 3 years ago

In addition to the abovementioned issues, requiring the use of a PlantUML server for rendering a Markdown preview means that PlantUML diagrams cannot use the !include feature. The only workaround that I can see would be to run a local PlantUML server with a volume mount for sharing the included files.

moincreemers commented 2 years ago

"The server is mandatory for markdown rendering all the time...". Run a local server? Uninstalled...

mawid6 commented 1 year ago

"The server is mandatory for markdown rendering all the time...". Run a local server? Uninstalled...

It actually is not that bad - if we accept that the target audience for this extension are developers that run vs code, running a local server for this is certainly not a stretch.

Especially considering how easy it is to do so ( TLDR: (1) Pre-req: You have plantuml (and graphviz) installed on your machine. (2) Start local server by running plantuml.jar -picoweb -v. That is it. )

See https://github.com/qjebbs/vscode-plantuml#use-plantuml-server-as-render

That said, yes, the readme needs to be updated.

chandu140390 commented 1 year ago

Go to File -> Preferences -> Settings in Search Settings, search for PlantUML Scroll down the searches until you get Plantuml: Render. Under that change from Local to PlantUMLServer. Under setting Plantuml: Server, type https://www.plantuml.com/plantuml Close and opent he file and preview to get the diagram.

Hope this works for you!

arwedus commented 1 year ago

While running plantUML on a local machine as a server is a workaround (note: It's not a good one, because then VS Code asks you to allow "insecure local content"), the extensions vscode-markdown-preview-enhanced is capable of running an internal plantUML for markdown preview. Apparently they solved the technical problem you describe, @qjebbs ... would it be possible to apply their solution? I would much prefer if the option to render "local" or "server" would apply to everything including the Markdown inline preview.

arwedus commented 1 year ago

I also just found out that starting up a local plantUML picoweb or docker instance on my remote workstation doesn't even help because of bug #513 .

However, I am pleased to learn that well-ar has found a solution that works locally and in a remote SSH VS Code session: https://github.com/well-ar/vscode-plantuml This fork adds an option "LocalServer" and starts plantUML as a local webserver transparently in the background. That fork solved the problem for me now, but may be worth considering to pull, @qjebbs ?

LY1806620741 commented 1 month ago

I always think that this mandatory requirement is very unfriendly and inconsistent. Plug-ins make complex things simpler, right? Can you start a local server and connect to it yourself? I remember how I solved it before, which was to directly use the Markdown Preview Enhanced plug-in. This is essentially support for markdown. I will still use your plug-in when using *.plantuml locally. Thank you for your work. @qjebbs