- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Questions about the compiler
Sat, 2012-01-28, 05:46
Using Scala 2.9.1. I have a simple java bean class with an annotation e.g.
@Foopublic class FooBean {
...}
I have some scala code that calls a method on FooBean.
The Foo annotation class is in a jar that is not accessible to the scala compiler, but FooBean is available in the compiler's classpath. When the scala compiler tries to compile my scala code, it gives me a "Missing dependency" error:
scala> new FooBeanerror: error while loading FooBean, Missing dependency 'class package.to.Foo', required by /home/raman/test/jars/foobean.jar(FooBean.class)<console>:8: error: FooBean does not have a constructor new FooBean
This seems very similar to https://issues.scala-lang.org/browse/SI-1135, which is marked as Fixed.
Has SI-1135 been broken in Scala 2.9.1?
Also, on a side note, I noticed that the subsequent times the compilation is executed, the "Missing dependency" error is no longer shown (which can be confusing):
scala> new FooBean<console>:8: error: FooBean does not have a constructor
new FooBean
Regards,
Raman
@Foopublic class FooBean {
...}
I have some scala code that calls a method on FooBean.
The Foo annotation class is in a jar that is not accessible to the scala compiler, but FooBean is available in the compiler's classpath. When the scala compiler tries to compile my scala code, it gives me a "Missing dependency" error:
scala> new FooBeanerror: error while loading FooBean, Missing dependency 'class package.to.Foo', required by /home/raman/test/jars/foobean.jar(FooBean.class)<console>:8: error: FooBean does not have a constructor new FooBean
This seems very similar to https://issues.scala-lang.org/browse/SI-1135, which is marked as Fixed.
Has SI-1135 been broken in Scala 2.9.1?
Also, on a side note, I noticed that the subsequent times the compilation is executed, the "Missing dependency" error is no longer shown (which can be confusing):
scala> new FooBean<console>:8: error: FooBean does not have a constructor
new FooBean
Regards,
Raman
Sat, 2012-01-28, 19:01
#2
Re: Questions about the compiler
On Saturday, January 28, 2012 4:01:15 AM UTC-5, Jason Zaugg wrote:
My google-fu failed me this time. Thank you!
Regards,
Raman
On Sat, Jan 28, 2012 at 5:46 AM, Raman Gupta <rocke...@gmail.com> wrote:The Foo annotation class is in a jar that is not accessible to the scala compiler, but FooBean is available in the compiler's classpath. When the scala compiler tries to compile my scala code, it gives me a "Missing dependency" error:
I believe this was fixed once and for all as SI-5343 [1] in commit 1684baef [2]. This is not available yet in a released version of Scala, but is available in 2.10.0-M1.
-jason
[1] https://issues.scala-lang.org/browse/SI-5343[2] https://github.com/scala/scala/commit/1684baef
My google-fu failed me this time. Thank you!
Regards,
Raman
I believe this was fixed once and for all as SI-5343 [1] in commit 1684baef [2]. This is not available yet in a released version of Scala, but is available in 2.10.0-M1.
-jason
[1] https://issues.scala-lang.org/browse/SI-5343[2] https://github.com/scala/scala/commit/1684baef