Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Motiejus Juodelis
    @MotiejusJ_twitter
    @niktrop what about idea.plugins.path, what should it point to?
    Nikolay Tropin
    @niktrop
    I just wanted to check you don't have any custom plugin directory. Your debug IDEA instance shouldn't have Scala plugin installed, it is provided automatically. Try to uninstall it, and run IDEA configuration. (It may took 2 times, I'm not sure why)
    Motiejus Juodelis
    @MotiejusJ_twitter
    uninstalled the plugin from debug IDEA, reran IDEA config few times.. getting Plugins supporting *.scala files not found so it's not picking up the plugin
    Nikolay Tropin
    @niktrop
    Check if you have -Dplugin.path in your configuration VM options and if you have plugin.xml in the scalaCommunity.jar:
    target\plugin\Scala\lib\scalaCommunity.jar\META-INF\plugin.xml
    Dmitrii Naumenko
    @unkarjedy

    uninstalled the plugin from debug IDEA, reran IDEA config few times.. getting Plugins supporting *.scala files not found so it's not picking up the plugin

    I usually get this when some exception occurs during built plugin initialization.
    Chack whether there are some exceptions in logs in <user>/.ScalaPluginIU/system/log or in main IDEA Console & IDEA tabs

    image.png
    Motiejus Juodelis
    @MotiejusJ_twitter
    @niktrop there is no -Dplugin.path in VM options, but plugin.xml exists in scalaCommunity.jar
    Motiejus Juodelis
    @MotiejusJ_twitter
    @unkarjedy no errors in idea.log
    Nikolay Tropin
    @niktrop
    @MotiejusJ_twitter You should restore -Dplugin.path option, it is in the run configuration in the repository:
    https://github.com/JetBrains/intellij-scala/blob/a570b9dcf6bef0bc9a96df0f580221f2a5b3af78/.idea/runConfigurations/IDEA.xml#L7
    We'll check if something is missing in our readme, sorry for that.
    Motiejus Juodelis
    @MotiejusJ_twitter
    @niktrop I have checked VM options of my original IntelliJ previously. In IDEA run configuration I have -Dplugin.path
    Nikolay Tropin
    @niktrop
    It should be in run configuration you start your debug IDEA. Are jars and plugin.xml in place?
    Motiejus Juodelis
    @MotiejusJ_twitter
    It was pointing to
    <intellij-scala-repo-dir>/target/tools/idea-runner/target/plugin/Scala
    I have changed to
    <intellij-scala-repo-dir>/target/plugin/Scala
    And now it seems to be working!
    Nikolay Tropin
    @niktrop
    It was a bug in sbt-idea-plugin: JetBrains/sbt-idea-plugin#36
    Seems that we haven't updated it's version yet. Thank you for reporting!
    Motiejus Juodelis
    @MotiejusJ_twitter
    Cool, thanks for help
    Tomasz Pasternak
    @tpasternak
    Hello folks, I have a question related to the recent changes in "Find usages" behavior. Do you know why only instance apply/unapply methods require bytecode search? I don't understand why this kind of method is special. For example, companion object's apply does not require it. The code that distinguishes them is here https://github.com/JetBrains/intellij-scala/blob/f55df32c25093dce4621f20488b825a3fa9c93d6/scala/scala-impl/src/org/jetbrains/plugins/scala/findUsages/compilerReferences/SearchTargetExtractors.scala#L45-L46
    Andrey
    @sugakandrey
    @tpasternak simply put, we can't efficiently search for such methods using traditional text based indices, with apply methods defined on objects you can search for all usages of said object (e.g. Foo) and check if they resolve to the apply method, on the other hand, instance apply method can be hidden pretty much anywhere, e.g.
    val someArbitraryName = SomeClassWithApplyMethod(1, 2, 3)
    someArbitraryName("456")
    Tomasz Pasternak
    @tpasternak
    @sugakandrey Ok, got it. Thanks!
    Wade Waldron
    @WadeWaldron

    I just upgraded to the latest version of IntelliJ and updated all my plugins. Previously I had a project that was working just fine. However, now when trying to import the SBT project I get the following:

    [error] (update) sbt.librarymanagement.ResolveException: unresolved dependency: io.github.sugakandrey#scala-compiler-indices-protocol_2.12;0.1.1: Resolution failed several times for dependency: io.github.sugakandrey#scala-compiler-indices-protocol_2.12;0.1.1 {compile=[default(compile)]}:: 
    [error]     typesafe-ivy-releases: unable to get resource for io.github.sugakandrey#scala-compiler-indices-protocol_2.12;0.1.1: res=https://repo.typesafe.com/typesafe/ivy-releases/io.github.sugakandrey/scala-compiler-indices-protocol_2.12/0.1.1/ivys/ivy.xml: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [error]     sbt-plugin-releases: unable to get resource for io.github.sugakandrey#scala-compiler-indices-protocol_2.12;0.1.1: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/io.github.sugakandrey/scala-compiler-indices-protocol_2.12/0.1.1/ivys/ivy.xml: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    [error]     typesafe-ivy-releases: unable to get resource for io.github.sugakandrey#scala-compiler-indices-protocol_2.12;0.1.1: res=https://repo.typesafe.com/typesafe/ivy-releases/io.github.sugakandrey/scala-compiler-indices-protocol_2.12/0.1.1/jars/scala-compiler-indices-protocol_2.12.jar: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    I am not using a corporate proxy of any kind.
    I can successfully run SBT and compile my project from command line, so it's not an SBT problem.

    Any ideas what might cause this?

    IntelliJ IDEA 2019.3 (Community Edition)
    Build #IC-193.5233.102, built on November 27, 2019
    Runtime version: 11.0.4+10-b520.11 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    macOS 10.14.6
    GC: ParNew, ConcurrentMarkSweep
    Memory: 3987M
    Cores: 16
    Registry:
    Non-Bundled Plugins: BashSupport, Docker, Lombook Plugin, SnakeYAML plugin, YAML/Ansible support, com.alayouni.ansiHighlight, io.protostuff.protostuff-jetbrains-plugin, mobi.hsz.idea.gitignore, org.intellij.scala

    Scala Plugin: 2019.3.17

    Andrey
    @sugakandrey
    @WadeWaldron hmm, thats strange. As a temporary solution you may want to disable Index .class files checkbox in Preferences | Build, Execution, Deployment | Compiler | Scala Compiler | Bytecode Indices.
    Wade Waldron
    @WadeWaldron

    In related news. I was using SBT 1.2.8 in my project. Tried changing to 1.3.4 and I got the following:

    [error] sbt.librarymanagement.ResolveException: Error downloading org.jetbrains:sbt-idea-compiler-indices;sbtVersion=1.0;scalaVersion=2.12:0.1.3
    [error]   Not found
    [error]   Not found
    [error]   not found: https://repo1.maven.org/maven2/org/jetbrains/sbt-idea-compiler-indices_2.12_1.0/0.1.3/sbt-idea-compiler-indices-0.1.3.pom
    [error]   not found: /Users/wadewaldron/.ivy2/local/org.jetbrains/sbt-idea-compiler-indices/scala_2.12/sbt_1.0/0.1.3/ivys/ivy.xml
    [error]   download error: Caught javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.lightbend.com/commercial-releases/org/jetbrains/sbt-idea-compiler-indices_2.12_1.0/0.1.3/sbt-idea-compiler-indices-0.1.3.pom
    [error]   download error: Caught javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.lightbend.com/commercial-releases/org.jetbrains/sbt-idea-compiler-indices/scala_2.12/sbt_1.0/0.1.3/ivys/ivy.xml
    [error]   not found: /Users/wadewaldron/Library/Application%20Support/IdeaIC2019.3/Scala/repo/org.jetbrains/sbt-idea-compiler-indices/scala_2.12/sbt_1.0/0.1.3/ivys/ivy.xml
    [error]   download error: Caught javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jetbrains/sbt-idea-compiler-indices/scala_2.12/sbt_1.0/0.1.3/ivys/ivy.xml
    [error]   download error: Caught javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.typesafe.com/typesafe/ivy-releases/org.jetbrains/sbt-idea-compiler-indices/scala_2.12/sbt_1.0/0.1.3/ivys/ivy.xml

    Along with a whole bunch more errors.

    Wade Waldron
    @WadeWaldron
    The workaround with the .class files does work for resolving the first error. It doesn't help for the SBT upgrade.
    Borja Lorente
    @blorente

    Hey! I'm trying to try out the Scala plugin in development mode, but it doesn't seem to be loading in the development instance of IntelliJ. I suspect it's related to me being in the EAP beta version of IC, given this message:

    2019-12-05 15:20:54,522 [   1675]   WARN - com.intellij.util.xmlb.Binding - no accessors for interface com.intellij.openapi.extensions.PluginDescriptor 
    2019-12-05 15:20:54,608 [   1761]   WARN - j.internal.DebugAttachDetector - Unable to start DebugAttachDetector, please add `--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED` to VM options 
    2019-12-05 15:20:55,184 [   2337]   WARN - llij.ide.plugins.PluginManager - Plugin "Android String Parser" is incompatible (since build 193.5233 > IC-193.4697.15) 
    2019-12-05 15:20:55,184 [   2337]   WARN - llij.ide.plugins.PluginManager - Plugin "TFS" is incompatible (since build 193.5233 > IC-193.4697.15) 
    ...

    Is that possible? Is there a known solution besides downgrading to 192?

    Edoardo Luppi
    @lppedd
    Is there someone here who could clarify the process of aligning the method chain inlay hints?
    I'm not proficient in Scala so reading the source is a bit cumbersome.
    Nikolay Tropin
    @niktrop
    @lppedd What do you want to know?
    Edoardo Luppi
    @lppedd
    Nikolay Tropin
    @niktrop
    @blorente Are you on a idea193.x branch? Please try to update the branch and refresh sbt project. You may have the same project as
    https://gitter.im/JetBrains/intellij-scala?at=5dd657995b3db9548ac4cc1e
    Borja Lorente
    @blorente
    @niktrop Will do! I was in the latest release branch, but I'll try
    Edoardo Luppi
    @lppedd
    Also I don't understand very well the involvement of the alignmentLines field.
    Nikolay Tropin
    @niktrop
    @lppedd Yes
    Edoardo Luppi
    @lppedd

    @niktrop this notation

    private val alignmentLines: Seq[AlignmentLine] = { ... }

    means it is a getter, or is it calculated only one time lazily?

    Thanks btw.
    Nikolay Tropin
    @niktrop
    It is calculated once when AlignedInlayGroup is created.
    Edoardo Luppi
    @lppedd
    @niktrop ok, thanks!
    Tobias Kahlert
    @SrTobi
    @lppedd hi, the alignment lines are needed to calculate the margin. you can see in the code above that it is a combination of average and maximum
    Edoardo Luppi
    @lppedd
    @SrTobi yep, thanks for the clarification! Last question, locally block is executed as soon as the class is instantiated right?
    Sorry for the apparent dumb questions. I'm trying to understand how to work efficiently with inlays, instead of manually placing JComponents in via the Editor instance.
    Tobias Kahlert
    @SrTobi
    yes, it basically has no other purpose other than to clarify that it is run right there and then (in this case in the constructor). it has no own effect
    Edoardo Luppi
    @lppedd
    @SrTobi thank you! I suppose there is no way to access the inlay's underlying component and set, e.g., a mouse cursor, right?
    Question emerges after seeing the various InlayPresentations, especially the OnClick* one
    Tobias Kahlert
    @SrTobi
    There are no dumb questions :D well, the whole thing with the alignment is a little bit messy, because there is no special support for it. it basically involves to calculate the margin correctly while in the paint method, because it is the only method that gets called at the right moments to have at least some responsiveness when the user is typing.
    Edoardo Luppi
    @lppedd
    Thanks for the clarifications, much appreciated!
    Tobias Kahlert
    @SrTobi
    @lppedd hmm depends on what you want to do... I mean you can ctrl+click our inlays and the cursor changes and the color too. See especially src/org/jetbrains/plugins/scala/codeInsight/implicits/TextPartsHintRenderer.scala and also src/org/jetbrains/plugins/scala/annotator/hints/Text.scala.
    Edoardo Luppi
    @lppedd

    @SrTobi oh okay! I'll take a look then!
    So the cursor change is still only implemented for the Scala plugin? If you try hovering with CTRL pressed on Java code, the inlay hint part is highlighted but the cursor does not change to the pointer variation.

    I suppose you check if the mouse is inside the inlay bounds, and if it is and CTRL is pressed you change it?

    (it is a lot of work indeed!)
    Tobias Kahlert
    @SrTobi
    yes it's done by the MouseHandler
    Edoardo Luppi
    @lppedd

    @SrTobi I think for the moment I won't handle this hahaha
    It's already a lot of work to set up rendering and alignment

    Your clarifications have been very important, thanks again

    Tobias Kahlert
    @SrTobi
    I would just copy the code from the AlignedInlayGroup file and then adjust what you need (or throw out stuff you don't need)
    Edoardo Luppi
    @lppedd
    @SrTobi I could do that and convert to Kotlin, but it is better I try to implement it myself first for learning purposes.
    In case I'll take some parts from the Scala code :)
    Tobias Kahlert
    @SrTobi
    ok : )
    OlegYch
    @OlegYch
    @ghidei perhaps you want to turn 'show types even if they are obvious'