Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Greg Fisher
    @gnfisher
    I'm seeing a curious thing (metals/coc.nvim) where a value class that was updated is understood properly in some places but not in others. For example, after the change, in the same function, the result errors (expects a single value, it has been changed to a list, compiler understands). yet in the body of that function, the autocomplete behaves real strangely, thinking it is still the single value type (with the old attribute name). I've done a bloop exit and restarted nvim/metals... not going away. Any suggestions?
    Swoorup Joshi
    @Swoorup
    is there a way to directly import external sbt project in worksheet file?
    Swoorup Joshi
    @Swoorup
    nvm
    Chris Kipp
    @ckipp:matrix.org
    [m]
    @Fubuchi: there shouldn't be anything special needed to get nodes to show there I believe in Scala 2 that's the way it works, so it may be something funky going on with Scala 3. I see you created a discussion about it. I'll move it to an issue and we'll follow-up there.
    Chris Kipp
    @ckipp:matrix.org
    [m]
    @gnfisher: 🤔 are you able to provided maybe a minimal example of what is happening @gnfisher and submit an issue with it? I'm not fully sure what could be going on
    nafg
    @nafg
    https://youtu.be/97HCUZwRpQA how does @kubukoz get errors to show inline?
    Jakub Kozłowski
    @kubukoz:matrix.org
    [m]
    Error Lens vscode extension
    nafg
    @nafg
    thanks :)
    Kamyar
    @kammoh:matrix.org
    [m]

    Hi!
    I'm using metals+vscode+bloop on macOS/M1 where only the snapshot versions of bloop work. I've set "Bloop Version" settings to "1.4.8-45-8b51bdd9" and have the same version of bloop-jvm installed using coursier. Native "bloop" is not installed and the bloop is a symlink to bloop-jvm. I am absolutely sure there's not other bloop executable on my system.

    Everything work fine and bloop version seems to be correct

    ls -al `which bloop`
    lrwxr-xr-x  1 kamyar  staff  64 Jun  4 13:28 /Users/kamyar/.local/bin/bloop -> /Users/kamyar/Library/Application Support/Coursier/bin/bloop-jvm
    
    ❯ bloop about 
    bloop v1.4.8-45-8b51bdd9

    Until once in a while things stop working and when I the check the running server version I get:

    ❯ bloop about
    bloop v1.4.8-19-4d9f966b

    Where is this server version coming from and how can I stop this from happing?
    Cleaning the project (+.bloop and .metals directories, metals.sbt files etc) and killing running java processes solves the issue for a while but it happens again in couple of days!
    I also tried adding bloop-sbt plugin with the correct version to my project but it doesn't seem to be helping.

    Kamyar
    @kammoh:matrix.org
    [m]

    :point_up: Edit: Hi!
    I'm using metals+vscode+bloop on macOS/M1 where only newer snapshot versions of bloop work. I've set "Bloop Version" settings to "1.4.8-45-8b51bdd9" and have the same version of bloop-jvm installed using coursier. Native "bloop" is not installed and the bloop is a symlink to bloop-jvm. I am absolutely sure there's not other bloop executable on my system.
    Everything work fine and bloop version seems to be correct

    ls -al `which bloop`
    lrwxr-xr-x  1 kamyar  staff  64 Jun  4 13:28 /Users/kamyar/.local/bin/bloop -> /Users/kamyar/Library/Application Support/Coursier/bin/bloop-jvm
    
    ❯ bloop about 
    bloop v1.4.8-45-8b51bdd9

    Until once in a while things stop working and when I the check the running server version I get:

    ❯ bloop about
    bloop v1.4.8-19-4d9f966b

    Where is this server version coming from and how can I stop this from happing?
    The only trace of that version in my project directory is in .metas/metals.log:

    > No server running at 127.0.0.1:8212, let's fire one...
    > Resolving ch.epfl.scala:bloop-frontend_2.12:1.4.8-19-4d9f966b...

    Cleaning the project (+.bloop and .metals directories, metals.sbt files etc) and killing running java processes solves the issue for a while but it happens again in couple of days!
    I also tried adding bloop-sbt plugin with the correct version to my project but it doesn't seem to be helping.

    3 replies
    Swoorup Joshi
    @Swoorup
    under -source:future I get an issue with worksheet
    image.png
    It thinks I am using underscores for imports even though asterisks has been used.
    Swoorup Joshi
    @Swoorup
    logged an issue: scalameta/metals#2864
    Swoorup Joshi
    @Swoorup
    btw does nightly metals still somehow use 3.0.0 compiler to compile 3.0.1-RC1 sources specified in sbt?
    I am getting this issue time and again.
    [error] ## Exception when compiling 16 sources to /Users/swoorup.joshi/personal/finflow-scala/trader/target/scala-3.0.1-RC1/classes
    [error] scala.MatchError: AppliedType(TypeRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class finflow)),object common),WithEnv$package),WithEnv),List(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class typesafe)),object config),Config), AppliedType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class actor)),object typed),Behavior),List(TypeRef(ThisType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class trader)),object actors),module class TradeEngine$)),type Command))))) (of class dotty.tools.dotc.core.Types$CachedAppliedType)
    which is fixed on the RC1 version, but somehow props up every now and then.
    And can be fixed by clean; compile
    Chris Kipp
    @ckipp:matrix.org
    [m]

    btw does nightly metals still somehow use 3.0.0 compiler to compile 3.0.1-RC1 sources specified in sbt?

    it shouldn't, no

    Swoorup Joshi
    @Swoorup
    That's Weird
    I wonder there is some sort of cache created by the compiler that creates this invalid blob or something
    Chris Kipp
    @ckipp:matrix.org
    [m]
    does this happening when switching from 3.0.0 -> 3.0.1-RC1 or just from a fresh RC1 project?
    Swoorup Joshi
    @Swoorup
    project dated far back as 0.27 dotty release. But I often git clean -dxf and clean in general.
    and is on 3.0.1-RC1 early as when it was released :P
    Swoorup Joshi
    @Swoorup
    is there an easy way to run a worksheet and drop into console?
    The imports and objects within the console is just an continuation of the worksheet.
    I have some time intensive thing going on, trying to think what is the best way of handling this, without writing a dedicated main project.
    Chris Kipp
    @ckipp:matrix.org
    [m]
    not really no, however what is the end goal?
    is it that you just want quick repl responses?
    and if so, does the quick evaluation in the worksheet itself not suffice? or how would dropping into the console help?
    Swoorup Joshi
    @Swoorup
    its working with external web requests, akka streams, but don’t want the editor to time out.
    Chris Kipp
    @ckipp:matrix.org
    [m]
    ahh, would maybe an ammonite script work better? so then you still have metals support in the script, but you can just run it with amm?
    Swoorup Joshi
    @Swoorup
    probably something like notebooks, which I assume has sections that can be independently executed but still has knowledge of context I assume?
    hmm, never tried ammonite.
    Chris Kipp
    @ckipp:matrix.org
    [m]
    I'd recommend giving it a try
    Swoorup Joshi
    @Swoorup
    trying to look through some learning materials. What is the difference between ammonite vs sbt console?
    Chris Kipp
    @ckipp:matrix.org
    [m]
    in some ways they can be used similarly but most of the time sbt console is used when you want to drop into a repl within the context of your sbt build. Ammonite has some of the same concepts, but is more used as either an alternative to the scala repl or as a script runner
    Swoorup Joshi
    @Swoorup
    does it still understand current sbt projects though?
    Chris Kipp
    @ckipp:matrix.org
    [m]
    no, it's completely separated from sbt
    Swoorup Joshi
    @Swoorup
    I do want the ability to use my own codebase though.
    This seems like what I want :P
    image.png
    Quafadas
    @Quafadas
    @Swoorup almond is awesome...
    Swoorup Joshi
    @Swoorup
    :frowning: Have to wait for scala 3 support and no sbt project support due to ammonite.
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Scala 3 support has been merged in Ammonite, not sure how stable it is. Almond will follow suit eventually, as the maintainer of it was indeed the one who merged Scala 3 support :)
    You can potentially already run Scala 3 scripts with ammonite, just need the right version:
    ❯ cs launch ammonite --scala-version 3.0.0
    Loading...
    Welcome to the Ammonite Repl 2.3.8-124-2da846d2 (Scala 3.0.0 Java 14.0.1)
    @ import $ivy.`org.typelevel::cats-core:2.6.1`
    import $ivy.$
    
    @ import cats._
    import cats._
    
    @ case class Test(a: Int)
    defined class Test
    
    @ given Eq[Test] with
        def eqv(t1: Test, t2: Test) = t1.a - t2.a == 0
    
    defined object ``
    
    @ import cats.syntax.all._
    import cats.syntax.all._
    
    @ Test(25) === Test(35)
    res5: Boolean = false
    Swoorup Joshi
    @Swoorup
    oh lol, nice :D
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Swoorup Joshi
    @Swoorup
    Sounds like internal only feature from that changelog description, but I’ll give you the benefit of doubt. :P