Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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
    sinanspd
    @sinanspd
    Is there an easy way for me to introduce a new keyword to be highlighted (I am running my own distribution of Scala to develop new features) ?
    Anton Solovyev
    @Rosteelton
    image.png
    Hi! I have some problems with go to sources in scala 3.0 with vscode.
    For some classes it doesn't work, for example, ConfigReader (but I can find it manually with #ConfigReader).
    Is there some issue with it?
    Chris Kipp
    @ckipp:matrix.org
    [m]
    @Swoorup: cool I hope that works for you!
    @sinanspd: I don't believe there is an easy way to add that unless you'd add it into the actual scala syntax plugin https://github.com/scala/vscode-scala-syntax
    Sheng-Loong Su
    @code_ssl_twitter
    Hi everyone, is there a way in Vim to quickly add type annotation like in Intellij, eg. from def run() = {...} to def run(): Unit = {...}? I tried coc-codeaction-line and got No code action available.
    felher
    @felher
    @code_ssl_twitter I asked that myself a couple of months back. The answer was: Move with the cursor over the variable and do:
    :call CocActionAsync("codeAction", "cursor")
    Of course, you should be able to map that to whatever you want :)
    Sheng-Loong Su
    @code_ssl_twitter
    Wow, it works! Thanks a lot, @felher!
    Quafadas
    @Quafadas

    WIth metals, I'm using sbt as my build server in an (experimental :-/) multi project setup,

    I want to customise some integration tests

    class WithDbFramework extends utest.runner.Framework

    In an SBT terminal, the tests run fine.

    If I click on the "ghost link" to run the test "in place" in metals, I get errors. The test looks for a test config file;

    val confFile = new File("./modules/backend/src/test/scala/dev.conf")

    which apparently, it can't find ...

    [ERROR] Uncaught exception when running tests: org.ekrich.config.ConfigException$Missing: ./modules/backend/src/test/scala/dev.conf (not found): No configuration setting found for key 'db'

    Would this be expected? Is it expected that an sbt terminal exhibits different behaviour to "metals runner"?

    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    Hello 👋 just joined to ask whether i need to set up sth specifically for getting metals support for simple scala scripts in VS code
    Chris Kipp
    @ckipp:matrix.org
    [m]
    hey Nik, can you explain what sth is?
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    sth = something? :)