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

ref: Move plugin to separate submodule, add plugin api test project #317

Merged
merged 11 commits into from
Feb 14, 2025

Conversation

MarcinVaadin
Copy link
Member

Moved plugin to separate module, added plugin api test project

Copy link
Contributor

@czp13 czp13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice one! The test project works for me! And this is super helpful to test changes without shooting up a lot of other stuffs.

> Task :plugin-api-test-client:test
PluginApiTests > testWrite() PASSED
PluginApiTests > testWriteBinary() PASSED
PluginApiTests > testDelete() PASSED

The only thing I need to do to change this variable to my case:

    private static final String PROJECT_BASE_PATH = "/Users/pczuczor/Projects/intellij-plugin";

Could we mention somewhere that developers need to fine tune this variable to their environment?
(And not sure if it worth the hassle to extract it to app property, but mentioning in readme would be helpful or somewhere)

Other option to make it relative path maybe.

@MarcinVaadin
Copy link
Member Author

Other option to make it relative path maybe.

Suggestions applied, please retest

@MarcinVaadin MarcinVaadin requested a review from czp13 February 13, 2025 13:23
@czp13
Copy link
Contributor

czp13 commented Feb 13, 2025

Ah, I played with it, my Intellij is quite weird.

Not all tests are passing (write always pass, delete usually failed, writeBinary sometimes fails)
image

But definitely the path check for the plugin file is dynamic, relate 👍 So works better!
Maybe there is some flakiness in my environment, I will investigate a bit, what is going on.

czp13
czp13 previously approved these changes Feb 13, 2025
@MarcinVaadin
Copy link
Member Author

Test updated, please remember to always run test project while running current plugin snapshot (Run Plugin). Otherwise it will be testing version that is installed by default in IntelliJ.

@czp13
Copy link
Contributor

czp13 commented Feb 14, 2025

Test updated, please remember to always run test project while running current plugin snapshot (Run Plugin). Otherwise it will be testing version that is installed by default in IntelliJ.

First I did not run the plugin, and it was testing nothing, as the client was null and it was exiting silently.
We might want to assertTrue that client is not null and put some error, log message?

Then I started the plugin, and then I began to get some flakiness said (so deletion was not always working).

Copy link

Artifact build on last commit: distributions.zip.
For MacOS users: there is a zip inside this zip and Finder unzips them both at once. Use unzip distributions.zip from Terminal or check solution for Archive Manager.

Copy link

Plugin com.vaadin.intellij-plugin:1.0-SNAPSHOT against IC-233.11799.241

Compatible. 1 usage of deprecated API. 53 usages of experimental API

Copy link

Plugin com.vaadin.intellij-plugin:1.0-SNAPSHOT against IU-233.11799.241

Compatible. 1 usage of deprecated API. 65 usages of experimental API

Copy link

Plugin com.vaadin.intellij-plugin:1.0-SNAPSHOT against IU-251.14649.49

Compatible. 2 usages of deprecated API. 37 usages of experimental API

Copy link

Plugin com.vaadin.intellij-plugin:1.0-SNAPSHOT against IC-251.14649.49

Compatible. 2 usages of deprecated API. 25 usages of experimental API

Copy link
Contributor

@czp13 czp13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not block this further and merge it! Thank you for the work.

@czp13
Copy link
Contributor

czp13 commented Feb 14, 2025

Stating it works, the only small thing is that I encounter an IDEA window error everytime I run the tests:
image

But maybe just my envorinment:

java.lang.Throwable: Invalid file: file:///Users/pczuczor/Projects/intellij-plugin/plugin-api-test-client/src/test/resources/test.txt (invalid)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)

@MarcinVaadin MarcinVaadin merged commit dd1d51c into main Feb 14, 2025
10 checks passed
@MarcinVaadin MarcinVaadin deleted the ref/test-project branch February 14, 2025 09:35
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

Successfully merging this pull request may close these issues.

2 participants