Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate ASP server distro from asciidoctor plugin and install lazy #472

Open
de-jcup opened this issue Dec 4, 2022 · 3 comments
Open

Comments

@de-jcup
Copy link
Owner

de-jcup commented Dec 4, 2022

Situation

It took much effort to get maven tycho build working #371 - at least with asp launcher dependencies etc.
the branch für #371 does work locally on my machine, but when removing the installed ASP server jar from user home folder
the plugin fails (of course), because the dist jar is no longer available/the lib plugin is not available.

Providing the dist.jar inside editor plugin or lib plugin via Tycho (as before)

One solution would be to provide a lib plugin again with the dist jar inside, but there is a problem with Tycho: It does not simply create a wrapped osgi part for the dist jar (maybe because of the special classifier "dist" ) but only on the dependencies. So
adding the dist jar is not so easy.

Another problem here is something that is very odd today: When a user installs n eclipse instances on his/her machine, the user will install the editor plugin and always get a complete ASP server distro inside. Even if the user does NOT want the distro. Also the distro is copied to ~/.eclipse-asciidoctor-editor/libs/$version (but only one time) and started from there. So we have n+1 locations of the distro jar. This is a waste of memory and also time (always downloaded in a fresh eclipse environment).

Wanted

  • A user shall only have the ASP server distro ONE time installed /downloaded.
  • A user shall have only the ASP server distro when ASP is wanted.
  • Less problems with Maven Tycho dependencies about the distro jar (which is a "fat jar")

Solution

The ASP server install mechanism will be changed and the dist jar is no longer part of the plugin itself.

The ASP server instances are available at maven central - e.g. Version 1.4.1 is available at
https://repo1.maven.org/maven2/de/jcup/asp/asp-server-asciidoctorj/1.4.1/asp-server-asciidoctorj-1.4.1-dist.jar

When the render process is starting, we will now

  • when ASP usage is activated, but the wanted ASP server version is not available inside ~/.eclipse-asciidoctor-editor/libs/$version the plugin will start downloading the version from maven central (https only) at the location.
  • show up a User model dialog (with a canceable progress monitor) which informs the user whats going on!
  • when the user cancels the operation, the settings will be changed to "use native asciidoc" and the render mechanism is restarted (and should work when asciidoc is installed)
  • css and addons will be kept as is (we handle here only the server install process in a new way)
@de-jcup de-jcup added this to the 3.0.0 milestone Dec 4, 2022
@de-jcup
Copy link
Owner Author

de-jcup commented Jan 6, 2023

I did implement a solution at a local branch and it works... but ...

  • there are business proxy problems again which would be necessary to to fix (use eclipse proxy settings, warn user etc.)
  • it has a smell of a "Command server" which downloads code ... from a security perspective this smells a little bit "evil" even if there is only the best interest for the user
  • it does not come automatically over the plugin install mechanism, but on another approach
  • the plugin does not longer work "out-of-the-box"

So ... I am really not sure if this should be the way.

@de-jcup de-jcup removed this from the 3.0.0 milestone Jan 6, 2023
@de-jcup de-jcup closed this as completed Jan 6, 2023
@de-jcup de-jcup reopened this Jan 6, 2023
@de-jcup
Copy link
Owner Author

de-jcup commented Jan 6, 2023

I still have to think about this.

@de-jcup
Copy link
Owner Author

de-jcup commented Jan 20, 2023

At least added the implementation to the feature branch by last commit (so available if still interesting in future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant