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

Reproducible build #3

Open
bzz opened this issue Jun 15, 2020 · 14 comments
Open

Reproducible build #3

bzz opened this issue Jun 15, 2020 · 14 comments
Assignees

Comments

@bzz
Copy link

bzz commented Jun 15, 2020

Thank you for sharing interesting plugin!

Right now, there does not seem to be an easy way to build the plugin locally from the sources.

It would be nice to set up a reproducible build instructions that would allow that e.g using gradle / https://github.com/JetBrains/gradle-intellij-plugin or any other way.

@linghuiluo
Copy link
Member

@jonasmanuel can you take care of this?

@jonasmanuel
Copy link
Collaborator

Hi,
thank you for the suggestion @bzz
We will look into it, to see how we can improve the process 👍

@jonasmanuel jonasmanuel self-assigned this Jun 15, 2020
@jonasmanuel
Copy link
Collaborator

Until we have a setup that works just from gradle:
right now we are just using intellijs built-in feature to build the plugin:

  • Import the project into IntelliJ
  • go to Build -> Prepare Plugin Module 'MagpieBrigdeLSPSupport' for Deployment

The Plugin Module zip should be exported to the root of the project folder.

@jonasmanuel
Copy link
Collaborator

In #4 you mentioned you are using the EAP version of IntelliJ.
As far as I can see, there were some significant changes made to the Platform SDK since version 2019.1.

I will look into what changed and try to support the current version of intelliJ. However I did not see any mention of the missing classes and packages in the list of incompatible API changes , so I am unsure why they would not be available any more.

@juliandolby
Copy link
Contributor

One thing I noticed at one point was that I needed to build intellij community from source in order to get libraries with all the APIs that I found on the Web. If the changes are not listed, perhaps we need to do that again?

@juliandolby
Copy link
Contributor

I just managed to build intellij community from github, and our plugin built with that for me. The main change I needed was an extra dependency in plugin.xml, or the plugin could not find needed classes at runtime. That is pushed.

I am currently running the plugin on IntelliJ IDEA 2020.3

@juliandolby
Copy link
Contributor

Probably we will need to fix something soon, because ProjectComponent has been deprecated. For now, things seem to work, though.

@jonasmanuel
Copy link
Collaborator

Thanks for looking into it. Did not occur to me that building yourself would change the classes deployed in the SDK. Thats quite strange.
It also does not really seem to help with a reproducible build. I will try to use the older version in the gradle build and see if that helps it.

That is pushed.

I do not see the commit oO. Can you push it again?

@juliandolby
Copy link
Contributor

i push to the 'ibm' branch

@jonasmanuel
Copy link
Collaborator

oh ok

@juliandolby
Copy link
Contributor

juliandolby commented Jun 24, 2020

I was looking at the newly-deprecated PluginComponent, and it looks like there are new APIs that we are supposed to use: documentation

A quick look suggests the migration will not be hard, but will be a bit of tedious work.

@jonasmanuel
Copy link
Collaborator

As a first fix I think we can just use StartupActivity register a dispose listener to the Project to be notified of projects opening and closing.
This seems to work fine as far as I can see.
Not sure about the quickfixes though (have not completely figured out how they work in the first place tbh 😉)

I have now figured out the gradle build and with the added dependency on the java module it seems to produce a valid and deployable plugin that runs in the latest intellij.

@jonasmanuel
Copy link
Collaborator

Hi @bzz ,

I have now published a new release here and pushed the project with the gradle setup.
Please have a look if this solves the problems you were having. As far as I can see it should now work in intelliJ 2019.2 through to the latest EAP.

@bzz
Copy link
Author

bzz commented Jul 9, 2020

Sorry for the delay as it's ICSE now. Looks awesome to me, thank you for fixing this - I will take a look and get back to you here.

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

4 participants