Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Marius Soutier
    @mariussoutier
    Hello, I'm trying to enable package prefixes in my sbt project. It works well in sub-modules that use the src/main/scala layout, but it doesn't in Play sub-modules that use Play's app layout. The problem is that all library imports that start with com. are not recognized anymore (marked as red)
    1 reply
    My own project's package name also starts with com, so I guess the problem is somehow there
    jeremyrsmith
    @jeremyrsmith
    Just wanted to see if there's resources being applied to Scala 3. I switched to nightly Scala plugin and it's still borderline unusable for Scala 3 (compared to Scala 2) Believe me I know that is a huge change and won't happen overnight – just wanted to check, should I report Scala 3 issues? Or are Scala 3 issues basically all the same "nothing works" issue at this point?
    3 replies
    Aaron Radzinski
    @aradzinski

    Quick bug report (before I create a ticket for it):
    I have Scala 3.0.1 Maven project with latest nightly of Scala plugin. Project compiles fine both in IDEA and 'mvn package'. However, the instant I open a file in IDE - all of the types are marked red with "Not found: type XYZ" for every XYZ type in my project... Annoying as hell to be honest as I have to work with fully "red" project all the time.

    Is this a known issues that will be resolved soon?

    4 replies
    Oron Port
    @soronpo
    Scala 3 nightlies and local snapshot are at 3.1.0-RC1-XXXX. IJ paints everything red.
    2 replies
    Probably the part where the plugin selects the proper dialect according the Scala version expects 3.0.x or 2.xx only.
    Matthew de Detrich
    @mdedetrich
    Not sure if its related but I am also getting issues getting Intellij to properly detect Scala3/Dotty, in my case its this project https://github.com/getquill/protoquill
    2 replies
    Dale Wijnand
    @dwijnand
    I use code folding/unfolding a lot and I'm finding that the editor sometimes doesn't recognise a new fold (eg convert parens to block). Is there a way to "repaint" or something the editor? Closing and reopening the file works, but it sometimes messes with my editor splitting.
    2 replies
    Igal Tabachnik
    @hmemcpy
    General question: is there a plan to migrate to Slack (or, preferably, Discord) for this chat?
    1 reply
    Vladimir Morozov
    @greenhost87
    Hi all, I have problem with "Quick fix" menu, for example 'add import' works only after I build my project (or try to run it), but if I move cursor quick fix broke again. Info: Scala 3.0.1, lates IDEA + nightly Scala plugin build + built-in error highlighting + OSX
    May be some work around exists?
    1 reply
    Luc Henninger
    @flomebul
    Hello. I have an issue when I use accented character such as 'e' with a grave accent for test class, such as "class MillimètreSpec extends AnyFlatSpec with Matchers". If I try to run this test directly, it's ok. But if I try to run all the tests of the package, I have an error "java.io.UncheckedIOException: java.nio.charset.MalformedInputException: Input length = 1".
    After view investigation, it look like the system generate a file (e.g. @D:\Users\Luc\AppData\Local\Temp\idea_scala_test_runner6027035054604294689.tmp)that contain all the test to run, but the class name are not generated using "UTF-8" encoding.
    Is there a way to correct this?
    5 replies
    Krisztian Lachata
    @lachatak
    hi. i am working on an intellij scala extension for my macro library support. everything works fine however i need to manually add my ijext plugin to intellij scala extensions Even though i provided the intellij-compat.json for my macro library to force intellij to download and apply the ijext lib for macro support. i am using the latest CE edition and sbt-idea-plugin. any ideas why it does not work automatically? thank you
    1 reply
    Igal Tabachnik
    @hmemcpy
    Who curates the "Scala bundle" on the marketplace? Thank you for including the ZIO plugin :) https://plugins.jetbrains.com/bundles/2-scala-bundle
    Vladimir Klyushnikov
    @vladimirkl
    Hi guys, is there any way to stop optimizing imports when moving files in project? Every time I move them I end with absolutely broken imports which I need to restore manually.
    Vladimir Morozov
    @greenhost87
    Screenshot 2021-09-02 at 17.36.46.png
    7 replies
    Mark T. Kennedy
    @mtk
    i'm using the latest ultimate EAP (IU-212.5284.31) with the latest scala nightly plugin (2021.2.443). and the package search plugin is bundled with the EAP release. i can see the package search plugin settings in the settings window. i have a trivial "hello, world" scala 2.16.6 sbt project. and i've read https://blog.jetbrains.com/scala/2021/07/09/package-search-integration/, which says package search should work for scala. but for the life of me i can't get it to work at all. it makes me feel insane. thoughts/comments?
    Mark T. Kennedy
    @mtk
    sorry, meant 2.13.6, not 2.16.6.
    xuansontrinh
    @xuansontrinh
    image.png

    i'm using the latest ultimate EAP (IU-212.5284.31) with the latest scala nightly plugin (2021.2.443). and the package search plugin is bundled with the EAP release. i can see the package search plugin settings in the settings window. i have a trivial "hello, world" scala 2.16.6 sbt project. and i've read https://blog.jetbrains.com/scala/2021/07/09/package-search-integration/, which says package search should work for scala. but for the life of me i can't get it to work at all. it makes me feel insane. thoughts/comments?

    Hello @mtk, I am also testing this with the latest ultimate EAP and the latest scala nightly and scala version 2.13.6 (the same versions with yours). and I can manage to use package search for it. So if it is okay for you, could you please send me the link to your project for me to test it out on my machine? Furthermore, additional info like environment you are running, enabled plugins, etc. would be very helpful.

    Mark T. Kennedy
    @mtk
    the env is windows 10 (although i've been using unix since 1982 :-)). it is completely up to date. you can clone github.com/mtk/BareBones for an example that fails (for me). i tested against a fresh idea EAP install, added the scala plugin, switched to nightly and updated.
    Mark T. Kennedy
    @mtk
    btw, if i do a shift-shift search and enter 'package search', i only get four responses: 1) a link to the package search settings screen, 2&3) a check for new dependency versions toggle (one each for maven & gradle, both on), and 4) a 'package search plugin' toggle (also on). no other actions.
    Arsene
    @Tochemey
    Hello
    Please has anyone experience this before: Unable to open a .sbt file
    I click on the file but the editor does not open it
    Nikolay Tropin
    @niktrop
    @Tochemey Can it be scalameta/scalafmt#2734 ?
    5 replies
    GitZinger
    @GitZinger

    how to set the label position or location?

    val a=new Label {
    
            //locationOnScreen =new Point(400,600)
            //location= new Point(400,600)}

    I got an error :Reassignment to val location.
    also how to make a picture label moving ?
    how to make a picture zoom shrink inside a label? I don't want to display the original size.
    also how to make a picture label overlap a little bit with another?

    1 reply
    Igal Tabachnik
    @hmemcpy
    Good morning! sbt v1.6.0-M1 was just released, it merged some fixes relating to the BSP support (mainly, allowing using Rebuild project from IntelliJ as well as compilation progress reports, in addition to other fixes). I wrote a small blog post about how to use BSP in IntelliJ, if you're not using it already! https://hmemcpy.com/2021/09/bsp-and-intellij/
    Sean George
    @seanag0234
    Screen Shot 2021-09-22 at 9.14.43 AM.png
    1 reply
    I am always getting ^^^ when I open Intellij. I used the EAP version at one point, but I haven't for a few months. I tried uninstalling, and then reinstalling the plugin. Any ideas on how to fix this besides updating to the EAP version of Intellij?
    Andriy Plokhotnyuk
    @plokhotnyuk
    :+1:
    Alex
    @unthingable
    Has anyone run into a case where Intellij insists on building an sbt subproject as scala3 even though the subproject itself is explicitly set to scalaVersion := "2.13.6", and know of a fix? Sbt itself is not confused.
    Andriy Plokhotnyuk
    @plokhotnyuk
    @unthingable Have you tried if the latest IntelliJ IDEA -> BSP -> sbt 1.6.0-M1 works for you?
    6 replies
    Igal Tabachnik
    @hmemcpy

    I gave my plugin a shot at building with the newly released 2021.3 EAP (and scala-plugin 2021.3.4) - I'm getting this error on my CI now:

    my_test failed: com.intellij.testFramework.TestLogger$TestLoggerAssertionError: jarFiles is not set for PluginDescriptor(name=IDE Features Trainer, id=training, descriptorPath=plugin.xml, path=~/.zio-intellijPluginIC/sdk/213/plugins/featuresTrainer/lib/featuresTrainer.jar, version=213.3714.440, package=training, isBundled=true), took 0.001 sec

    Anyone know what this might be?

    10 replies
    My test fixtures is mostly a copy-paste from the scala-plugin's ScalaInspectionTestBase and the related rabbit hole of files
    1 reply
    Oron Port
    @soronpo

    For several version now (not sure how it started) I'm unable to compile with IJ, just with SBT. I get this error:

    java.lang.NoSuchMethodError: 'java.lang.String dotty.tools.xsbt.DelegatingReporter.messageAndPos(dotty.tools.dotc.reporting.Message, dotty.tools.dotc.util.SourcePosition, java.lang.String, dotty.tools.dotc.core.Contexts$Context)'
        at dotty.tools.xsbt.DelegatingReporter.doReport(DelegatingReporter.java:37)
        at dotty.tools.dotc.reporting.Reporter.go$3$$anonfun$2(Reporter.scala:162)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.Option.foreach(Option.scala:437)
        at dotty.tools.dotc.reporting.Reporter.go$1(Reporter.scala:174)
        at dotty.tools.dotc.reporting.Reporter.issueIfNotSuppressed(Reporter.scala:193)
        at dotty.tools.dotc.reporting.Reporter.report(Reporter.scala:196)
        at dotty.tools.dotc.report$.issueWarning(report.scala:24)
        at dotty.tools.dotc.report$.warning(report.scala:59)
        at dotty.tools.dotc.config.CliCommand.checkUsage$$anonfun$1(CliCommand.scala:168)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.collection.immutable.List.foreach(List.scala:333)
        at dotty.tools.dotc.config.CliCommand.checkUsage(CliCommand.scala:168)
        at dotty.tools.dotc.config.CliCommand.checkUsage$(CliCommand.scala:13)
        at dotty.tools.dotc.config.CompilerCommand.checkUsage(CompilerCommand.scala:12)
        at dotty.tools.dotc.Driver.setup(Driver.scala:87)
        at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:63)
        at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
        at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:92)
        at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:57)
        at org.jetbrains.jps.incremental.scala.local.LocalServer.doCompile(LocalServer.scala:52)
        at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:30)
        at org.jetbrains.jps.incremental.scala.remote.Main$.compileLogic(Main.scala:207)
        at org.jetbrains.jps.incremental.scala.remote.Main$.$anonfun$handleCommand$1(Main.scala:190)
        at org.jetbrains.jps.incremental.scala.remote.Main$.decorated$1(Main.scala:180)
        at org.jetbrains.jps.incremental.scala.remote.Main$.handleCommand(Main.scala:187)
        at org.jetbrains.jps.incremental.scala.remote.Main$.serverLogic(Main.scala:163)
        at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:103)
        at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

    Is this something known?

    scalac: Cannot connect to compile server at localhost/127.0.0.1:3,200 (Connection refused: connect)
    Oron Port
    @soronpo
    It seems to be related to the Scala version from 3.1.x onward
    Andriy Plokhotnyuk
    @plokhotnyuk
    Please add support of CrossType.Full by the presentation compiler. Currently all types that are defined in platform directories (not shared) are not recognized when used.
    image.png
    image.png
    Alex
    @unthingable
    Unrelated to Scala but I'm failing at googling: IDEA indicates lines changed since last git commit in the gutter, is there a way to also indicate lines that changed in the last commit from previous?
    Nikolay Tropin
    @niktrop
    Not on exactly on the gutter, but if you turn on git annotations, lines changed in the last commit are highlighted:
    1 reply
    image.png
    Guido Contreras Woda
    @guiwoda
    Hi everyone! We're starting to use Lagom in our company and I can't seem to configure how to let SBT know that our project uses java 11. Every time I run sbt sync from IDEA, the project settings roll back to java 8.
    We currently have configured the build as so: Compile / javacOptions ++= Seq("-source", "11", "-target", "11")
    Guido Contreras Woda
    @guiwoda
    Nevermind... figured it out:
    [info] my-project / Compile / javacOptions
    [info]     List(-g, -encoding, UTF-8, -source, 1.8, -target, 1.8, -parameters, -Xlint:unchecked, -Xlint:deprecation, -source, 11, -target, 11, -Xlint:unchecked, -Xlint:deprecation)
    2 replies
    Ben Plommer
    @bplommer
    Hi - is it possible to set IntilliJ to use sbt shell for reloads/builds by default?
    1 reply
    Yann Moisan
    @YannMoisan

    hello. I have a message "Cannot perform operation, Too Complex, sorry" when I'm trying to modify build.sbt. Any idea ?

    IntelliJ IDEA 2021.2.2 (Community Edition)
    Build #IC-212.5284.40, built on September 14, 2021
    Runtime version: 11.0.12+7-b1504.28 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
    macOS 10.15.7
    GC: G1 Young Generation, G1 Old Generation
    Memory: 2048M
    Cores: 16
    Registry: scala.erase.compiler.process.jdk.once=false
    Non-Bundled Plugins: PythonCore (212.5284.44), org.intellij.scala (2021.2.22)
    Kotlin: 212-1.5.10-release-IJ5284.40

    2 replies
    Vladimir Morozov
    @greenhost87

    Hi All, I have big problem with Scala 3 plugin, my project very often use constructions like:

    object Reproduce {
      case class User(id: UUID)
    
      sealed trait TestBase
      case class Test01(data: String, id: Int) extends TestBase
    
      def render: PartialFunction[(TestBase, User), String] = { case (base: Test01, user) =>
      }
    }

    My expectations variable base have type Test01 and code completion + code navigation + refactoring + etc. works, but latest Scala plugin, sadly yet, think that base have type Any in result code editing is very painful, refactoring not work and many other problem.
    IDE: Idea Ultimate 2021.2.3 RC, Scala plugin 2021.2.449

    2 replies
    Ben Plommer
    @bplommer
    Hi, I'm getting this error [error] (ThisBuild / updateIntellij) java.io.FileNotFoundException: https://d2s4y8xcwt8bet.cloudfront.net/com/jetbrains/intellij/idea/ideaIC/203.7148.15-EAP-SNAPSHOT/ideaIC-203.7148.15-EAP-SNAPSHOT.zip when trying to load the sbt-idea-example (https://github.com/JetBrains/sbt-idea-example) project - any ideas?
    1 reply
    Igal Tabachnik
    @hmemcpy
    Something is missing in the New (experimental) project wizard ;)
    5 replies