by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nikolay Tropin
    @niktrop
    @soronpo We need more details. Let's continue in our tracker
    https://youtrack.jetbrains.com/newIssue?project=SCL
    Dmitrii Naumenko
    @unkarjedy
    @soronpo
    Do you use Nightly plugin?
    Do you observe the issue in some project with dotty?
    Do you observe the issue mainly on project opening?
    Do you have any worksheet editors open in your project?
    Oron Port
    @soronpo
    I use the nightly. haven't tried dotty
    No worksheets
    I observe the issue all the time now. Can't get out of it.
    Brian P. Holt
    @bpholt
    Random feature request: autocomplete of the latest version of a dependency in a .sbt file
    Is anyone aware of such a thing?
    Gavin Bisesi
    @Daenyth
    I think there's an sbt plugin that allows you to use 1.^ version strings or so and then have a lock file to pin them, like some other languages do
    might work?
    OlegYch
    @OlegYch
    @bpholt i think it already supports that
    Brian P. Holt
    @bpholt
    🤯
    Idk, I tried it with different combinations of "org.typelevel" %% "cats-effect" % "2.1." to no avail :(
    OlegYch
    @OlegYch
    do you have maven plugin enabled?
    Brian P. Holt
    @bpholt
    hmm, good question
    probably not, I disabled all the plugins I thought I wouldn't need
    Gavin Bisesi
    @Daenyth
    whoa really?
    I also disabled maven, I had no idea I could do that
    OlegYch
    @OlegYch
    after updating indexes it should suggest versions
    although updating indexes doesn't seem to work for me atm
    Brian P. Holt
    @bpholt

    Yeah, after enabling it, I do get versions!

    Although… it only suggests 0.4, 0.10.1, and 2.0.0. Huh. (for cats-effect, I mean)

    It is warning me about a lot of unknown artifacts though, maybe I need to set something else up
    OlegYch
    @OlegYch
    damn my keymap is completely crapped in latest idea eap
    Oron Port
    @soronpo
    @OlegYch happened to me too
    The keymap thing
    OlegYch
    @OlegYch
    not sure if there is a better place
    Oron Port
    @soronpo
    But it looks like it's better to have a new issue
    Pavel Fatin
    @pavelfatin
    Just a quick reminder: you can follow https://twitter.com/IntelliJScala to get news and updates from the IntelliJScala team :)
    Philip
    @philipschwarz
    a bit off topic, but maybe someone can help
    I am writing some unison code - if I add the .u extension to the Haskell file type the result is quite good
    image.png
    image.png
    image.png
    image.png
    is there a way of stopping simbols like :arrow_right: && ++ () from being shown as if 'selected' (appearing in a box of a different, lighter colour) ?
    Nikolay Tropin
    @niktrop
    @philipschwarz It's probably better to ask author of Haskell plugin you are using.
    Philip
    @philipschwarz
    @niktrop doh, of course, thanks
    Jason Zaugg
    @retronym

    @niktrop I'm currently reimplementing scala-async as a phase of the compiler: scala/scala#8816 . A few details of name mangling are changing and I'm investigating how to adapt intellij-scala to these.

    The refactoring effort is in part to support a user of scala-async that integrates it via a compiler plugin that demarcates async blocks with annotations. The effect is quite similar to Kotlin's suspend functions. So I'd also like to find a way to make support for async in "evaluate expression" work in their environment, too. My idea is to detect replace (or augment) the current InsideAsync static analysis with a dynamic analysis of the enclosing classes in the VM at the breakpoint. If one of these has the 'fingerprint" of an async state machine, we can trigger the strategy of evaluating local variables and methods as selections of fields and methods from the state machine class.

    Does this sound like a reasonable approach? How does Kotlin's compiler/debugger handle things?

    While looking at this, I noticed at least one bug and an inefficient implemetation in some code contributed (as part of JetBrains/intellij-scala#386) to the the debugger. I'm tring to rework this in: https://github.com/retronym/intellij-scala/pull/1/commits/ea56504671599f5f837c21a05f592a154b141d4f

    For both of these changes I'd like to add a test case. I have a manual test in https://github.com/retronym/boxer/blob/topic/xasync/README.md. But rather than trying to introduce another third-party dependency to your build, I was thinking it would be simpler to have a debugger test that has one set of sources that will be loaded in the project when debugging, and a "shadow" set of sources that will be used to create the classfiles. The "shadow" sources can include the expansions that a compiler plugin would have made. If you think this approach makes sense,

    ... could you give a few pointers on how to refactor ScalaDebuggerTestBase to support that?
    If you have any general suggestions about ways that we could compile async state machines with better metadata to support debugging, please let me know.
    OlegYch
    @OlegYch
    is there a way to see what a type alias is actually referring to?
    OlegYch
    @OlegYch
    like alt-enter but on type
    Jason Zaugg
    @retronym

    could you give a few pointers on how to refactor ScalaDebuggerTestBase to support that?

    Here's the approach I'm working on: https://github.com/retronym/intellij-scala/pull/1/files#diff-463548c55f483c8570ee76caeb927a0eR19-R60

    The idea is to initially register the expanded source code (including synthetic wrappers), let the setUp() method compile it, and then temporarily edit the file within the test itself to remove the wrappers from the source code. Execution should use the classifies that include the synthetic wrappers.

    I'm having some problems running the tests today (after rebasing) so I'm not sure if my test implementation is correct. I'm re-running ;createIDEAArtifactXml ;idea-runner/createIDEARunConfiguration to see if that helps.

    Dmitrii Naumenko
    @unkarjedy

    @poslegm @olafurpg
    Sorry for the late reply! I saw your message last week but didn't have time to respond due to pre-release activities.

    scalatest, specs2, utest. What are the selection criteria for this list

    They were and still remain 3 most popular testing libraries at the moment their support was added.

    Regarding MUnit support:
    I will take a look at the state of MUnit later today and will reply what can be done in the ticket you've created: https://youtrack.jetbrains.com/issue/SCL-17360

    Nikolay Tropin
    @niktrop

    @retronym scala-async refactoring sounds very cool!

    My idea is to detect replace (or augment) the current InsideAsync static analysis with a dynamic analysis

    I think it may work even better than the current approach. Probably, the simplest option is to have a reserved word in a class name, so inner classes will contain it automatically.
    I know little about how debugger for kotlin coroutines works. AFAIK they are reworking it right now.

    Nikolay Tropin
    @niktrop

    The idea is to initially register the expanded source code (including synthetic wrappers), let the setUp() method compile it, and then temporarily edit the file within the test itself to remove the wrappers from the source code. Execution should use the classifies that include the synthetic wrappers.

    I'm not sure this approach is feasible because line numbers and other debug information for shadow sources will be completely different. I think it would be better to test the real thing, i.e. to compile a source code with a correct set of compiler options and compiler plugins.

    Nikolay Tropin
    @niktrop
    You'll probably need to provide custom ScalaSdkLoader in libraryLoaders method to use scala compiler with your changes. To change compiler options use
    ScalaCompilerConfiguration.instanceIn(getProject).defaultProfile (see, for example MetaAnnotationTestBase.enableParadisePlugin)
    Jason Zaugg
    @retronym

    I don't think the line numbers need to change. In:

    abstract class GetAllClassesForceTestBase extends PositionManagerTestBase {
      private val synthetic = "//<SYNTHETIC>"
    
      setupFile("Simple.scala",
        s"""
          |object Simple {
          |  def main(args: Array[String]) {
          |    class syntheticClass1 { class syntheticClass2 { $synthetic
          |    $offsetMarker"" $bp
          |    }}                                              $synthetic
          |  }
          |}
        """.stripMargin.trim)
      private def removingSyntheticLineContents(fileName: String)(f: => Unit): Unit ={
        val virtualFile = getVirtualFile(getFileInSrc(fileName))
        val charset = StandardCharsets.UTF_8
        val origiContent = virtualFile.contentsToByteArray()
        val content = new String(origiContent, charset)
        val edited = content.linesIterator.map(line => if (line.contains(synthetic)) "" else line).mkString(System.lineSeparator)
        virtualFile.setBinaryContent(edited.getBytes(charset))
        try f finally {
          virtualFile.setBinaryContent(origiContent)
        }
      }

    The idea is to just replace the wrapper lines with blank lines.