epam / sap-commerce-intellij-idea-plugin

A plugin for integration of SAP Commerce (aka Hybris) platform with JetBrains IntelliJ IDEA
https://plugins.jetbrains.com/plugin/12867-sap-commerce-developers-toolset/
GNU Lesser General Public License v3.0
54 stars 41 forks source link

Project refresh issue with bin/custom folder symlink #655

Open TatsianaZubrytskaya opened 1 year ago

TatsianaZubrytskaya commented 1 year ago

I have imported project from previous IntellijIdea versions. There are under git files in E:\projects\myproject\hybris\custom folder and E:\projects\myproject\hybris\bin\custom symlink

During Project refresh operation I have such IDE error:

java.lang.IllegalStateException: Duplicate key datamigration (attempted merging values YCustomRegularModuleDescriptor {name=datamigration, moduleRootDirectory=E:\projects\myproject\hybris\custom\myproject\datamigration} and YCustomRegularModuleDescriptor {name=datamigration, moduleRootDirectory=E:\projects\myproject\hybris\bin\custom\myproject\datamigration}) at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.intellij.idea.plugin.hybris.project.tasks.ImportProjectProgressModalWindow.run(ImportProjectProgressModalWindow.java:141) at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428) at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:512) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:87) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)

If I try to import project from existing resources one more time nothing is happens and project is not imported.

Reproduced on version 2023.2.6 and earlier

mlytvyn commented 1 year ago

@TatsianaZubrytskaya , thank you for reporting this, while I'm looking into it, can you please try disabling symlinks during the import?

image
TatsianaZubrytskaya commented 1 year ago

I exclude it there is no such error anymore during Project refresh image But there are symlink folders are exist during project import: image I uncheck it: image but project is not imported yet.

P.S. .idea/idea-modules folder is not created

mlytvyn commented 1 year ago

Seems like related to this issue - https://github.com/epam/sap-commerce-intellij-idea-plugin/issues/333