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

Bundled plugin not enabled when run test #474

Closed
izhangzhihao opened this issue Apr 4, 2020 · 10 comments
Closed

Bundled plugin not enabled when run test #474

izhangzhihao opened this issue Apr 4, 2020 · 10 comments
Milestone

Comments

@izhangzhihao
Copy link
Contributor

izhangzhihao commented Apr 4, 2020

I need the javascript plugin enabled when test running. but I found that, bundled plugin is not enabled even is already added to plugins dependencies:

intellij {
    pluginName name
    version 'IU-201.6668.121'
    plugins 'java', 'org.intellij.scala:2020.1.27', 'JavaScriptLanguage', 'CSS'
}

A quick test(the second assert failed):

class RainbowJavaScriptTest : LightJavaCodeInsightFixtureTestCase() {
    fun testJavaScriptPluginEnabled() {
        assertTrue(PluginManagerCore.getPlugin(PluginId.getId("org.intellij.scala"))?.isEnabled!!) //true
        assertTrue(PluginManagerCore.getPlugin(PluginId.getId("JavaScript"))?.isEnabled!!) //failed
    }
}

Other info:

id "org.jetbrains.intellij" version "0.4.18"
@izhangzhihao
Copy link
Contributor Author

izhangzhihao commented Apr 4, 2020

I found v0.4.12...v0.4.13 , but didn't get how to use this...

@izhangzhihao
Copy link
Contributor Author

Anyone can help? please...

@zolotov
Copy link
Member

zolotov commented Apr 10, 2020

I'll take a look at the issue at some point. Meanwhile, you can debug it yourself

@zolotov
Copy link
Member

zolotov commented Apr 10, 2020

could you attach idea.log from testing sandbox (build/idea-sandbox/system-test)?

Probably the problem that CSS depends on platform-images and fails because it's not loaded in tests. Does adding platform-images to intellij.plugins array help?

@izhangzhihao
Copy link
Contributor Author

izhangzhihao commented Apr 10, 2020

It works after adding 'platform-images' to plugins dependencies. but by the way, I'm also testing with ruby plugin, maybe there are still some other dependencies missing... because

PluginManagerCore.getPlugin(PluginId.getId("org.jetbrains.plugins.ruby"))?.isEnabled!!

is false

@izhangzhihao
Copy link
Contributor Author

And I didn't find idea.log under sandbox dir

@izhangzhihao
Copy link
Contributor Author

Nevermind, adding yaml fix the issue... Thanks~

@zolotov
Copy link
Member

zolotov commented Apr 10, 2020

it still the problem that hard to discover, I'd like to address it, reopening

@zolotov zolotov reopened this Apr 10, 2020
@baron1405
Copy link
Contributor

baron1405 commented Apr 11, 2020

I too experienced this issue running tests against a plugin with a dependency on the JavaScript ideaIU built-in plugin. Adding platform-images as a plugin dependency as suggested fixed the problem. Sure glad someone blazed this trail before me!

  • gradle-intellij-plugin: 0.4.18
  • Plugin SDK: ideaIU-2020.1
  • Platform: CentOS 7.6
  • IDE: IntelliJ IDEA Ultimate 2019.3.4

@YannCebron
Copy link
Member

@zolotov zolotov added this to the 0.4.19 milestone Apr 16, 2020
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