Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ólafur Páll Geirsson
    @olafurpg
    there's no published npm package however
    Julien Richard-Foy
    @julienrf
    @olafurpg oops indeed, I don’t know why I thought it was using Scala interfaces, sorry!
    (ah, that was the case initially, that’s why I was confused! build-server-protocol/build-server-protocol@c0a91ef )
    Ólafur Páll Geirsson
    @olafurpg
    Yeah, I agree it's better with TypeScript interfaces since it's more widely known and also maps closer to JSON
    Justin Kaeser
    @jastice
    good point, what would we need to do to publish the interfaces as package?
    Joan Goyeau
    @joan38
    Hey I'm trying to make BSP work for cross compiled projects in Mill
    Do you know in that case what version of Scala should we give?
    It seems that when we give all versions Idea is lost
    Is it ok to give only the latest version of Scala in a cross compiled project?
    Joan Goyeau
    @joan38
    I opened https://youtrack.jetbrains.com/issue/SCL-17551 this seems to be a bug on Intellij side
    Joan Goyeau
    @joan38
    What is the way to specify the "Excluded Folders"?
    Screen Shot 2020-05-15 at 01.25.17.png
    The red folders
    Ólafur Páll Geirsson
    @olafurpg
    @joan38 There's no way to specify that in BSP at the moment. See https://discordapp.com/channels/697002009336873011/697002154702929962/700316919936450571 for a related recent discussion
    I think it would be nice to add this feature to BSP
    Joan Goyeau
    @joan38
    Thanks @olafurpg
    Joan Goyeau
    @joan38
    What's the point of ScalaBuildTarget ?
    The std lib can be in via a dependency and in case of multi project which are on different Scala version I'm not sure what this is supposed to be
    Ólafur Páll Geirsson
    @olafurpg
    @joan38 metals uses ScalaBuildTarget to for example know what version of the presentation compiler to load for completions.
    Joan Goyeau
    @joan38
    I think I got it thanks @olafurpg
    Justin Kaeser
    @jastice
    similarly for intellij
    btw feel free to join the BSP discord @joan38 : https://discord.gg/RqReT2
    Andrea Turli
    @andreaturli
    hi there, I've recently started to use bloop with intellij. I wonder if anyone is sharing the same bloop server and use 2 clients (intellij and cli) to re-use the same server
    Jorge
    @jvican
    yes, the bloop server can be reused with as many concurrent clients as you wnt
    Olivier Mélois
    @Baccata

    Hey folks, so I'm looking at https://github.com/build-server-protocol/build-server-protocol/blob/master/docs/specification.md#test-request

    I'm maintaining a (niche) test framework and find myself having to implement an Intellij plugin to satisfy some users that really really want to run tests by clicking on buttons. A coworker and myself have come up with a hacky way for intellij to detect individual tests, which works short term but feels crap (ie I'd rather not do that for every single ide/editor)

    Is there some sort of test-framework agnostic piece of the protocol for test discovery ? IE, currently metals lets me run test suites from the editor, I assume by tapping directly into https://github.com/sbt/test-interface to detect what is a suite. Would it make sense for BSP to contain semantics for the test framework to return test names/locations to the editor, for it to display relevant UI elements ?

    Ólafur Páll Geirsson
    @olafurpg
    @Baccata if your goal is to have a nice GUI to run tests via IntelliJ then I am afraid the best (and only?) solution is to write a custom IntelliJ plugin.
    One alternative is to implement a JUnit runner for your testing library, similarly to how MUnit works
    You can use the ScalaTest JUnit runner as inspiration, it shouldn't require much effort to implement https://github.com/scalatest/scalatestplus-junit/blob/junit-4.13/3.2.2.x/src/main/scala/org/scalatestplus/junit/JUnitRunner.scala
    as long as the superclass of your test suites has the @RunWith(...) annotation then IntelliJ will automatically pick it up
    If you implement the Filterable interface from JUnit then users can optionally edit the IntelliJ configurations to select individual tests. It won't give you "go to test case definition", but it's better than nothing. See the MUnit runner https://github.com/scalameta/munit/blob/0c4ff57f667970e6574a4c7e02a6296e9feb8990/munit/shared/src/main/scala/munit/MUnitRunner.scala#L30
    The IntelliJ Scala plugin has a "BSP test" run configuration test but it doesn't support some features users normally expect like debugging
    IIUC, the Scala plugin team is refactoring their test framework implementation that will make it easier to accommodate more testing frameworks. See open ticket for improving the MUnit support in IntelliJ https://youtrack.jetbrains.com/issue/SCL-17360
    Olivier Mélois
    @Baccata

    :+1: this all makes sense, and confirms my suspicions.

    if your goal is to have a nice GUI to run tests via IntelliJ then I am afraid the best (and only?) solution is to write a custom IntelliJ plugin.

    depends. short term goal is what you describe. But it definitely feels like there should be some kind of protocol to describe these sort of interactions between the IDE and the test framework

    Ólafur Páll Geirsson
    @olafurpg
    I agree it would be lovely to have a protocol that allows testing frameworks to provide locations of test cases. It's quite tragic when testing libraries are sitting on top of this juicy data but can't make it available to IDE clients
    Olivier Mélois
    @Baccata
    defo
    so how does metals know what class/object is a test suite then ? directly tapping into sbt's test-interface ?
    Ólafur Páll Geirsson
    @olafurpg
    That comes from test-interface