Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Siddhant Sanyam
    @siddhant3s
    I have a runtime.universe.Symbol for object Foo which is a companion object of a case class. Is it possible to get the object Foo so that I can call a field from it ?
    Dmytro Mitin
    @DmytroMitin
    @lgirault You can use tokens.
    @siddhant3s I guess it's not about Scalameta. https://gitter.im/scala/scala
    Loïc Girault
    @lgirault
    thanks @DmytroMitin
    Luciano
    @lJoublanc
    Hey @lgirault how did you manage this? Which term did you use?
    Loïc Girault
    @lgirault
    haha It was something nice to have but not required so I have not taken the time to try it yet
    James Koch
    @jameskoch
    First-time contributor looking for some feedback - scalameta/scalameta#1886
    vito-c
    @vito-c
    I'm writing some macros for an annotation. Is there an example project somewhere I can take a look at that uses scalameta?
    Gabriele Petronella
    @gabro
    @vito-c scalameta macros are an abandoned project. You should use regular macro annotations instead
    vito-c
    @vito-c
    @gabro ah thank you for letting me know so quasiquotes?
    finding examples of macros at all has been tough :(
    Gabriele Petronella
    @gabro
    you can use quasiquotes in Scala macros
    as per examples, yeah, I know. There's a project that uses macro annotations that I maintain called enumero
    and also cats-tagless is a good starting point
    vito-c
    @vito-c
    @gabro thanks! :)
    Tomasz Godzik
    @tgodzik
    Hi, should we release for Scala 2.12.9? Seems that every dependency is already released, but I am not sure how to release for just 2.12.9
    and people are pinging us already in Metals :O
    Gabriele Petronella
    @gabro
    I’ll take a look
    Tomasz Godzik
    @tgodzik
    @gabro thanks!
    Gabriele Petronella
    @gabro
    @tgodzik the fix is more involved than expected, due to a change in scalap scalameta/scalameta#1893
    Tomasz Godzik
    @tgodzik
    @gabro damn, I was hoping it would just be a matter of updating the version, will try to take a look, but I know nothing, so my help might not be helpful :O
    Martijn Hoekstra
    @martijnhoekstra
    scala/scala#8282 may have an impact on scalameta (hopefully making your life easier, but...)
    should I ping anyone for that?
    Lorenzo Testa
    @kklorenzotesta
    Hi, I can't find anything in the doc about metacp, I understood that generate semanticdb files from libraries, is it correct?
    Ilya Kachalsky
    @IlyaHalsky
    Hi, I'm just starting with scalameta and I'm trying to build code analyzer, is there a way to get current line number from original file while traversing structure?
    Dmytro Mitin
    @DmytroMitin
    @kklorenzotesta now we have compiler plugin https://scalameta.org/docs/semanticdb/guide.html#sbt
    Dmytro Mitin
    @DmytroMitin
    @IlyaHalsky SymbolOccurrence includes range (start_line, start_character, end_line, end_character) https://scalameta.org/docs/semanticdb/specification.html#symboloccurrence
    Lorenzo Testa
    @kklorenzotesta
    @DmytroMitin with the compiler plugin if I want to generate the semanticdb files from a jar I should use InteractiveSemanticdb to get a compiler and then use the compiler api, right? And this is preferred over using metacp?
    Dmytro Mitin
    @DmytroMitin
    Lorenzo Testa
    @kklorenzotesta
    thank you very much, this is perfect
    Ilya Kachalsky
    @IlyaHalsky
    @DmytroMitin thank you very much!
    Siddhant Sanyam
    @siddhant3s
    Can IntelliJ expand macro-paradise macros (annotation macros) without me having to write a plugin?
    Actually, I should probably ask this in scala
    P. Oscar Boykin
    @johnynek
    hi all, does anyone know if the scaladocs are published anywhere? I can't seem to find them.
    there is a trick to get sonatype to serve it.
    P. Oscar Boykin
    @johnynek
    although, it doesn't seem to have types like Source, Defn, etc...
    okay... jackpot. those are in trees....
    Ólafur Páll Geirsson
    @olafurpg
    @johnynek cool, I didn't know oss.sonatype.org served javadocs, I normally use static.javadoc.io https://static.javadoc.io/org.scalameta/trees_2.12/4.2.3/scala/meta/index.html
    it would be nice to unidoc all the modules, but it's quite a hassle to setup

    Along with a REPL

    @ import $ivy.`org.scalameta::scalameta:4.2.3`, scala.meta._
    import $ivy.$                               , scala.meta._
    
    @ q"val x = 2"
    res1: Defn.Val = Defn.Val(List(), List(Pat.Var(Term.Name("x"))), None, Lit.Int(2))

    There's also ast explorer https://astexplorer.net/#/gist/1eef12317a449c79a21ce65c68d65d99/9ddae259a2cab4badae68010ccaf2d0b6910cc51

    Zoë Frances Weil
    @wanderlustzoe
    hello everyone! quick question:
    I’m porting over my project (which heavily relies on scalameta) to dotty. Does scalameta support being a dependency in a dotty project? I.e is it being built for dotty?
    Guillaume Martres
    @smarter
    It's not, but you can use Scala 2.13 dependencies from a Dotty project as long as you don't call any Scala 2 macro
    Zoë Frances Weil
    @wanderlustzoe
    @smarter <3
    Guillaume Martres
    @smarter
    this might not be ideal for scalameta since I think you need macros for the quasiquotes ?
    Zoë Frances Weil
    @wanderlustzoe
    also, does this mean that i shouldn’t build a project that relies heavily on scalameta in dotty, because there will be no longterm support?
    Guillaume Martres
    @smarter
    so the plan is for Scala 3.0 to be able to use libraries from 2.14 (or 2.13, TBD) in this way