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

"Duplicate bundled template ..." after updating from 0.5.0 to 0.6.1 #554

Closed
jansorg opened this issue Oct 29, 2020 · 8 comments
Closed

"Duplicate bundled template ..." after updating from 0.5.0 to 0.6.1 #554

jansorg opened this issue Oct 29, 2020 · 8 comments
Assignees
Labels
Milestone

Comments

@jansorg
Copy link

jansorg commented Oct 29, 2020

I updated the gradle-intellij plugin from 0.5.0 to 0.6.1.
Tests of my plugin now fail with an exception on duplicate file templates.

The file is stored at src/main/resources/fileTemplates/internal in a project with mixed java/kotlin sources. It seems to build at these locations:

  • build/resources/main/fileTemplates/internal/BashSupport Pro Bash.bash.ft
  • jar:file:/projectdir/build/idea-sandbox/plugins-test/bashsupport-pro/lib/bashsupport-pro-1.5.10.201-SNAPSHOT.jar!/fileTemplates/internal/BashSupport Pro Bash.bash.ft

The duplicate inclusion seems to break the file templates. 0.5.0 is working fine with the same build.gradle setup.

The exception is thrown in a test here:

	at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:182)
	at com.intellij.ide.fileTemplates.impl.FTManager.createAndStoreBundledTemplate(FTManager.java:198)
	at com.intellij.ide.fileTemplates.impl.FTManager.setDefaultTemplates(FTManager.java:187)
	at com.intellij.ide.fileTemplates.impl.FileTemplatesLoader.<init>(FileTemplatesLoader.java:93)
	at com.intellij.ide.fileTemplates.impl.FileTemplateSettings.<init>(FileTemplateSettings.java:32)
	at com.intellij.ide.fileTemplates.impl.ExportableFileTemplateSettings.<init>
@hsz
Copy link
Member

hsz commented Oct 29, 2020

Can you please check it with v0.5.1?

@hsz hsz added the bug label Oct 29, 2020
@zolotov zolotov self-assigned this Oct 29, 2020
@zolotov
Copy link
Member

zolotov commented Oct 29, 2020

what's the platform version?

@jansorg
Copy link
Author

jansorg commented Oct 30, 2020

I'm building against IC-2020.1.
The tests are also failing with 0.5.1, while everything is fine with 0.5.0.

@zolotov
Copy link
Member

zolotov commented Oct 30, 2020

could you check whether it works on 2020.3 eap for you, please? thanks

@jansorg
Copy link
Author

jansorg commented Oct 30, 2020

(using 0.6.1 of the gradle-intellij gradle plugin)

with IC-203.4818.26-EAP-SNAPSHOT the same tests are still failing.

with the current eap IC-203.5251.39-EAP-SNAPSHOT, I'm unable to run the tests, because almost all are failing with weird classloader/classcast exceptions.
Just in case that it's related:

java.lang.ClassCastException: 
class pro.bashsupport.shell.interpreter.UnixShellInterpreterService cannot be cast to class 
pro.bashsupport.shell.interpreter.ShellInterpreterService 
(pro.bashsupport.shell.interpreter.UnixShellInterpreterService is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @62be14ee;
pro.bashsupport.shell.interpreter.ShellInterpreterService is in unnamed module of loader 'app')

@zolotov
Copy link
Member

zolotov commented Nov 2, 2020

Thanks! 4818 a bit old for the experiments, could you try 203.5419-EAP-CANDIDATE-SNAPSHOT please?

@jansorg
Copy link
Author

jansorg commented Nov 2, 2020

With 0.6.1 and 203.5419-EAP-CANDIDATE-SNAPSHOT I'm not seeing the classloader issue anymore, but I'm still seeing the "duplicate bundled template" exception.

java.lang.Throwable: Assertion failed: Duplicate bundled template BashSupport Pro Bash.bash [file:/project/bashsupport-pro/build/resources/main/fileTemplates/internal/BashSupport Pro Bash.bash.ft, jar:file:/project/bashsupport-pro/build/idea-sandbox/plugins-test/bashsupport-pro/lib/bashsupport-pro-1.5.10.203-SNAPSHOT.jar!/fileTemplates/internal/BashSupport Pro Bash.bash.ft]
	at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:195)
	at com.intellij.ide.fileTemplates.impl.FTManager.createAndStoreBundledTemplate(FTManager.java:210)
	at com.intellij.ide.fileTemplates.impl.FTManager.setDefaultTemplates(FTManager.java:199)
	at com.intellij.ide.fileTemplates.impl.FileTemplatesLoader.loadConfiguration(FileTemplatesLoader.java:170)
	at com.intellij.ide.fileTemplates.impl.FileTemplatesLoader.lambda$new$0(FileTemplatesLoader.java:64)
[...]

@zolotov
Copy link
Member

zolotov commented Nov 2, 2020

thanks, we'll investigate

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

No branches or pull requests

3 participants