-
Notifications
You must be signed in to change notification settings - Fork 273
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
Re: #786: Automatically detect bundled sources in plugin dependency #954
Conversation
Windows runners tests failed due to: |
Windows runners have 14 GB of space on disk D which is used for executing actions (see: actions/runner-images#1341). We've used this limit after my changes because I added tests requiring the GoLand, and IDEA 2021.2.4 (additional 1.46 GB + 2.3 GB = 3.76 GB). As the solution, I will update our default IDEA version used in tests to 2021.2.4 and will adjust other tests where needed. This issue may happen in the future again if we download more files/IDEs, but the alternative solution is not trivial (see actions/runner-images#1341) and maybe we won't need it for a longer time. |
I updated the default tested platform version to 2021.2.4 and we have ~2 GB margin now. Edit: |
e8ba6f2
to
01d07f8
Compare
@@ -1,14 +1,13 @@ | |||
package org.jetbrains.intellij | |||
|
|||
import org.gradle.api.plugins.JavaPlugin | |||
import org.gradle.testkit.runner.BuildResult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Applies to entire file]
I cleaned the tests:
- reduced code duplication
- reduces code noise in testing methods, so they include actual tested context and assertions
- added messages to assertions - before there was a lot of "expected true, but got false" messages and now there will be more precise
All existing tests and logic should be preserved.
|
||
@Test | ||
fun `add bundled zip plugin source artifacts from src directory when localPath used`() { | ||
val localPath = createLocalIdeIfNotExists( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This downloads and unpacks IDEs next to the test Gradle home directory.
I created custom logic for downloading IDEs to not depend on the plugin logic (if reusing is even possible). It can be also used in other tests requiring local installations.
34cfecb
to
bdf0307
Compare
Agreed with Yann to skip a feature flag for this as it would introduce unnecessary complexity. I'm delaying the merge until the new version is released. I'll rebase the branch and fix failed checks after the release. |
…s from lib/src directory
…st to catch such issues more easily
…lliJSpec.kt tests
384365a
to
56faffc
Compare
# Conflicts: # CHANGES.md # README.md
Fixes: #786.
In the case when multiple source artifacts exist for a plugin, only the first one will be attached because of the IDEA issue: IDEA-292168.
This may be the case when bundled plugin contains sources - IDE sources are attached for bundled plugins so we will have plugin and IDE sources attached (attaching IDE sources was implemented in the scope of #153). I intentionally ordered plugin sources first to avoid IDEA-292168.
I was wondering whether we should configure sources when
intellij.downloadSources
is false and plugin is bundled, but I think it's better to add them always whenever we have them without downloading. What may look strange is that Ivy file will contain plugin's source entry in "regular" and-withSources
versions. Let me know if I should change it.Additional small cleanups:
collectJars()
for cleaner client codePluginDependency.sourcesDirectory
as it is legacy and not used at all