This page is no longer maintained — Please continue to the home page at www.scala-lang.org

@specialized, -Ylog and -Ydebug

3 replies
Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.
I'm trying to minimize a problem with specialization in Scalala, as a
followup to the recently fixed #4243.

But enabling debug logging in the specialize phase trips things up
before I get to the good parts.

 $ ~/code/scala/build/pack/bin/scala -version
 Scala code runner version 2.9.0.r24288-b20110214212706 -- Copyright
2002-2011, LAMP/EPFL

$ ~/code/scala/build/pack/bin/scala -Ylog:specialize -Ydebug
-nocompdaemon -e "class A[@specialized X]"
  [snip]
  Exception in thread "main" java.lang.AssertionError: assertion failed: illegal class file dependency between 'package object math' and 'class package'
       at scala.Predef$.assert(Predef.scala:100)

Full output:

https://gist.github.com/828145

I won't raise a bug, given it involves -Y. But I'm a bit stuck. Does this error sound familiar? Any ideas on how to get some useful output?

thanks,

-jason
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: @specialized, -Ylog and -Ydebug

On 2/15/11 12:51 PM, Jason Zaugg wrote:
> $ ~/code/scala/build/pack/bin/scala -Ylog:specialize -Ydebug
> -nocompdaemon -e "class A[@specialized X]"
> [snip]
> Exception in thread "main" java.lang.AssertionError: assertion failed:
> illegal class file dependency between 'package object math' and 'class
> package'
> at scala.Predef$.assert(Predef.scala:100)

It's been driving me nuts, but it's always a question of whether to
shave that particular yak at that particular moment and so far it has
sounded better to see what info I can squeeze out of something else.

I'm stuck right now for looking at anything like that, but I'm with you
in the "let's fix that" dept.

prokopec
Joined: 2010-02-19,
User offline. Last seen 34 weeks 5 days ago.
Re: @specialized, -Ylog and -Ydebug

> It's been driving me nuts, but it's always a question of whether to
> shave that particular yak at that particular moment and so far it has
> sounded better to see what info I can squeeze out of something else.
>
> I'm stuck right now for looking at anything like that, but I'm with
> you in the "let's fix that" dept.
>

This error apparently happens only with '-e' option. If you have any
hints or suspicions as to why that might be, that could help.

Alex

Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.
Re: @specialized, -Ylog and -Ydebug

On Wed, Feb 16, 2011 at 11:27 AM, Aleksandar Prokopec
wrote:
> This error apparently happens only with '-e' option. If you have any hints
> or suspicions as to why that might be, that could help.

I see it with scalac, too:
https://gist.github.com/828145#file_02_with_scalac.log

-jason

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland