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
    it's a good idea to have a video of adding a new feature e2e
    cc/ @tgodzik
    I still regularly check gitter, but discord is more usable from mobile so I check it more often
    I'm signing off for now, happy to chat more another time @asaadza Thank you for the nice questions :)
    asaadza
    @asaadza
    ... very nice, good night!
    asaadza
    @asaadza
    ... just so I don't forget (I still use github RO, for now, and I'll put it here since we were already in that ballpark), one thing I often think would make life even easier in vscode is stating where stuff is declared/defined along with the type info on-hover.
    Ólafur Páll Geirsson
    @olafurpg
    That's a good idea, feel free to open a feature request here https://github.com/scalameta/metals-feature-requests
    esp. good if you can include how to format the definition
    asaadza
    @asaadza
    RO as in read-only
    ... btw, re the video you linked to, it is good thanks, and covers quite a lot of stuff I have discovered when I play with scala in vscode, but for people who didn't realise how far you guys have come with this, it should be an eye-opener. I suspect many IJ users, for scala, have no idea how far metals has evolved.
    asaadza
    @asaadza
    Anyway, better head back to the metals channel for this type of stuff - this one is so quiet that a handful of off-topic comments has an inordinate effect on the signal to noise ratio!
    David Geirola
    @geirolz
    Hi guys, I have a simple question, there is a way to enable the doc generation during the build? So when I run sbt compile
    Ólafur Páll Geirsson
    @olafurpg
    @geirolz the mdoc command is implemented as an alias for the “run” command with configured main methods. It might be possibie to implement this by overriding the compile task, worth asking in a more sbt-focused channel
    David Geirola
    @geirolz
    @olafurpg Ok, this seems is working (Compile / compile) := (Compile / compile).dependsOn((docs / mdoc).toTask("Generate docs")).value
    Jack Koenig
    @jackkoenig
    Is is possible to do something sort of like the inline Scastie snippets, but at mdoc-generation time it generates the Scastie and then embeds the now existing link?
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Jack Koenig
    @jackkoenig
    Yes that's what I have in mind, but my understanding (and please correct me if I'm wrong) is that the inline variant generates a Scastie when the user opens the webpage. I'd rather the Scastie be generated when I run mdoc locally such that the resulting HTML is more similar to embedded a Scastie snippet

    eg.

    ```scala mdoc:scastie
    val x = 1 + 2
    println(x)
    ```

    I want mdoc to see this, and connect to Scastie and generate a link when I run mdoc, such that the resulting file has

    <script src='https://scastie.scala-lang.org/<newly generated link>?theme=light'></script>

    Rather than the current thing which is a big chunk of javascript

    I could probably do this myself via a modifier, but it sounds like a useful feature that someone may have already implemented
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Right. I think (haven't used this modifier myself) it's stateless and perhaps with good reason - you'd need to either have some persistence indexed by snippet or call Scastie on every run of mdoc?
    Jack Koenig
    @jackkoenig
    Yeah the solution I have in mind is calling Scastie every time mdoc is run, but I consider that less costly than Scastie being run every time a user accesses a page. That being said it would be nice to cache if nothing has updated and then it's no longer stateless which is obviously its own bag of worms.
    Maybe this is "build your own unique tool" territory
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Smells like it :)
    Jack Koenig
    @jackkoenig
    My use case is that I provide Scastie templates to my users, but then I have to update them manually every time I do a release which is a PITA
    Ólafur Páll Geirsson
    @olafurpg
    @jackkoenig does Scastie provide an API to generate links? The mdoc modifier part is probably easy to i
    imoke
    implement
    Jack Koenig
    @jackkoenig
    @olafurpg it looks like there is a way to do this: https://gitter.im/scalacenter/scastie?at=620ba54c4164105ab09bb1c1. It lacks 1 thing I need which is the ability to populate extra build information (a compiler plugin), but I don't think that would be very hard to add
    Kurvivor19
    @Kurvivor19
    hello! hope that's not offtopic. I have recently started to try out scala with emacs - lsp-metals setup, and i have run a wall with worksheets. Specifically, i fail to import classes of my project. I am probably missing something very simple and basic
    so, i have a class (ex. TweetReader) defined in some project file, it is in a package i have named, let's say naive. So i write "import naive.TweetReader" in my worksheet and all i get is an error. when i do the same in console (from sbt), that line works fine and i can use the class pproperly. But not in the worksheet