Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:59
    SethTisue closed #1810
  • 02:59
    SethTisue commented #1810
  • 02:58
    SethTisue commented #1810
  • 02:56
    SethTisue labeled #1892
  • 02:39
    SethTisue commented #759
  • 02:23
    SethTisue commented #9437
  • 02:23
    SethTisue commented #9437
  • 02:15
    SethTisue commented #11759
  • 02:13
    SethTisue commented #9441
  • 02:12
    SethTisue edited #9441
  • 02:10
    SethTisue labeled #9441
  • 01:56
    SethTisue labeled #9446
  • 01:56
    scala-jenkins milestoned #9446
  • 01:56
    SethTisue opened #9446
  • 01:44
    SethTisue labeled #9445
  • 01:44
    SethTisue edited #9445
  • 01:44
    SethTisue edited #9445
  • 01:44
    scala-jenkins milestoned #9445
  • 01:44
    SethTisue opened #9445
  • 01:26
    SethTisue labeled #9444
Seth Tisue
@SethTisue
2.12.13 JARs are now on Maven Central
Guillaume Martres
@smarter
no more version palindrome
until 2.13.12 or 3.0.3
Tomasz Godzik
@tgodzik
I am trying to work on releasing semanticdb for 2.12.13, but it seems we are no longer able to get any warnings to be included with semanticdb. The reporter keeps returning no errors, could it be related to scala/scala#8373 ?
I think 2.13 has the same problem
any ideas what might be going on?
Princess | April
@NthPortal
cc @som-snytt
Seth Tisue
@SethTisue

I think 2.13 has the same problem

@tgodzik not sure how to interpret this. is it possible that this was already fixed in 2.13 semanticdb and you just need to backport the same fix to 2.12? I might be misunderstanding.

Tomasz Godzik
@tgodzik
@SethTisue I think we haven't really fixed it, it's just not tested :/
almost sure it's not working in 2.13 currently, but I haven't had the chance to fix it
Tomasz Godzik
@tgodzik
we are using compiler.askLoadedTyped is it possible that's reponsible?
Seth Tisue
@SethTisue
@tgodzik you mean you think there might be a bug in askLoadedTyped? I'm not really sure what you're asking
in scala/scala, there is test coverage for askLoadedTyped in test/files/presentation, but I'm not sure if any of the test cases involve error & warning handling. you might look there and if there doesn't seem to be test coverage, add it yourself
Tomasz Godzik
@tgodzik

Sorry if I am being unclear, I haven't really delved into these regions before. Mostly I am asking if:

    val compiledTree =
      ask[compiler.Tree](r => compiler.askLoadedTyped(unit.source, r))
        .get(timeout)

might be missing the warnings and how I can get the same result while also getting warnings for sure. Something like: global.compileSource(...)? Though I am not sure how to get the fully typed tree there. I will try to dig around, but I need to first fix it for 2.12.13.

Seth Tisue
@SethTisue
@tgodzik I mentioned it to @lrytz, but he's generally much more active on GitHub on Gitter, so a better bet might be to mention him on a GitHub issue. the presentation compiler stuff is pretty stale/neglected in general, since most of the people who worked on it have moved on, so it might be more efficient to troubleshoot it yourself than to wait around too much longer. sometimes Jason remembers old presentation compiler lore, but he's on vacation this week and next
@tgodzik if askLoadedTyped worked for you before but has now regressed, then unless I'm missing some context, it makes more sense to consider that a regression and to fix it, then to consider using other API entirely (such as compileSource)? do I understand correctly that askLoadedTyped worked the way you wanted in older Scala versions?
Tomasz Godzik
@tgodzik
I think it worked before because warnings were reported right away and now they are published later on probably due to the new Wconf setting
I might file an issue then and ignore it in semanticdb for now, it's mostly needed to interactively create semanticdb files
Tomasz Godzik
@tgodzik
I reported an issue here: scala/bug#12308 and in the meanitime I will dig into the issue myself.
Tomasz Godzik
@tgodzik
compiler.runReporting.reportSuspendedMessages() seems to have helped
Brutspark
@brutspark
Hi all I am new in Scala and really excited on its abilities . Currently working on hardware simulator design in Scala which is my diploma project, (such as AVR, ESP32, and RISCV MCU/CPU), I also would like to include Linux distro generation such as Buildroot using my environment, I want to add embedded linux programming to my simulator, can you suggest any libraries, I know about Chiesel https://www.google.com/imgres?imgurl=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F415qT%2BB7M9L.jpg&imgrefurl=https%3A%2F%2Fwww.amazon.com%2Fmake-RISC-V-Microcomputer-using-programmer-ebook%2Fdp%2FB07VSBSGRM&tbnid=BPYg0wXZOjMazM&vet=12ahUKEwiq2NaE4pvuAhUQRBoKHSVYD40QMygAegUIARCgAQ..i&docid=c_ZAEI0_ZT3a5M&w=313&h=500&q=how%20to%20make%20riscv%20cpu%20book&hl=en&ved=2ahUKEwiq2NaE4pvuAhUQRBoKHSVYD40QMygAegUIARCgAQ. I want to make Proteus like software for Linux using Scala also add Embedded Linux Programming Feature, If someone interested on can help I am open brutspark@gmail.com Sergey from Armenia.
>>=
@fommil
@brutspark a fun thing to do would be to emulate some old games consoles. I remember a talk about 5 years ago emulating a classic 90s game boy.
Seth Tisue
@SethTisue
@brutspark hello, and welcome to Scala! the scala/contributors room is about working on changes to Scala itself, so your question would be more appropriate in the main room, which is scala/scala
Bjorn Regnell
@bjornregnell
is this a known bug (couldn't find it in issues or didn't know what to search for)?
it gives error in REPL but works when compiled
Welcome to Scala 2.13.4 (OpenJDK 64-Bit Server VM, Java 11.0.9.1).
Type in expressions for evaluation. Or try :help.

scala> trait Base
trait Base

scala> object Sub extends Base
object Sub

scala> Sub.isInstanceOf[Sub.type]
error: Error while emitting <console>
assertion failed:
  Trying to access the this of another class: tree.symbol = class $read, class symbol = class iw compilation unit: <console>
     while compiling: <console>
        during phase: jvm
     library version: version 2.13.4
    compiler version: version 2.13.4
  reconstructed args: -deprecation -feature -Wconf:cat=feature:w -Wconf:cat=deprecation:w -Wconf:cat=deprecation:ws -Wconf:cat=feature:ws -Wconf:cat=optimizer:ws

  last tree to typer: Literal(Constant(type))
       tree position: <unknown>
            tree tpe: Class(classOf[])
              symbol: null
           call site: constructor $iw in package $line5

== Source file context for tree position ==
:quit
$ cat test.scala 
trait Base
case object Sub extends Base 

object Main {
  def main(args: Array[String]): Unit = {
    val t = Sub.isInstanceOf[Sub.type]
    println(t)
  }
}
$ sbtn run
[info] entering *experimental* thin client - BEEP WHIRR
[info] terminate the server with `shutdown`
> run
[info] running Main 
true
[success] Total time: 0 s, completed Jan 15, 2021 5:47:09 PM
found even more "minimalized" reproduction of the error:
scala> object X
object X

scala> X.isInstanceOf[X.type]
error: Error while emitting <console>
assertion failed:
  Trying to access the this of another class: tree.symbol = class $read, class symbol = class iw compilation unit: <console>
     while compiling: <console>
        during phase: jvm
     library version: version 2.13.4
    compiler version: version 2.13.4
  reconstructed args: -deprecation -feature -Wconf:cat=feature:w -Wconf:cat=deprecation:w -Wconf:cat=deprecation:ws -Wconf:cat=feature:ws -Wconf:cat=optimizer:ws

  last tree to typer: Literal(Constant(type))
       tree position: <unknown>
            tree tpe: Class(classOf[])
              symbol: null
           call site: constructor $iw in package $line4

== Source file context for tree position ==
Tom Grigg
@griggt
@bjornregnell seems like it might be a regression in scala/scala#8748 (2.13.2+)
i think the crash goes away if you start the REPL as scala -Yrepl-class-based:false
som-snytt
@som-snytt
@bjornregnell it is now a known bug. scala/bug#12312
Bjorn Regnell
@bjornregnell
@som-snytt I'm feeling more comfortable now with more known knowns on this planet - thnx!!
Eric K Richardson
@ekrich
I was wondering about SNAPSHOTS with Scala collection compat. If I build and publishLocal I get this as a version 2.1.1+265-bca8a641+20210115-1537-SNAPSHOT when I would expect to get something starting with 2.3.2, the latest version.
Princess | April
@NthPortal
have you pulled upstream's tags recently?
Eric K Richardson
@ekrich
Dang thanks for reminding me.
Why do tags not come along for the ride?
Eric K Richardson
@ekrich
@NthPortal Thanks for the help, reading about tags is a topic in itself.
Princess | April
@NthPortal
I don't know. I'm lucky that the client I use seems to automatically fetch them for me, or I'm sure I'd be in the same boat
np :D
Eric K Richardson
@ekrich
I learned on the command line. I thought the tools are confusing.
sinanspd
@sinanspd
Hello folks,
Does anybody know if it is possible share a global structure like a Map between compiler phases ?
Seth Tisue
@SethTisue
@sinanspd is this in a compiler plugin, or what?
what is it you're trying to do?
sinanspd
@sinanspd
Compiler plug in
Basically I need to take two passes through the code. One recursively builds a permission table based on annotations that are user coded with some function definitions. And in the second pass I need to look at the callers and check if they have enough permission to call that Functions, fail otherwise
Andrew Valencik
@valencik

From the predef in regards to assertions:

Variants of assert intended for use with static analysis tools are also provided: assume, require and ensuring. require and ensuring are intended for use as a means of design-by-contract style specification of pre- and post-conditions on functions, with the intention that these specifications could be consumed by a static analysis tool.

Can anyone suggest example of static analysis tools that do leverage these?

Guillaume Martres
@smarter
Andrew Valencik
@valencik
Thanks @smarter, stainless is a cool one
Seth Tisue
@SethTisue
@sinanspd in a compiler plugin, the plugin wraps a component which wraps one or more phases. so you should be able to store your Map in the component or plugin instead of in one of the phases
Eric K Richardson
@ekrich
Scala collection compat is green for the Scala Native 0.4.0 - scala/scala-collection-compat#387
Eric K Richardson
@ekrich
Thank-you. Do you plan to cook up a release this week with all the new versions?
Seth Tisue
@SethTisue
@ekrich opened scala/scala-collection-compat#413 — not sure if I'll get to it this week