scaldi / scaldi

Lightweight Scala Dependency Injection Library
Apache License 2.0
287 stars 26 forks source link

scalajs support #19

Open antonkulaga opened 10 years ago

antonkulaga commented 10 years ago

It would be great to see scalajs version of scaldi as in many usecases (like binding scala view classes to html tags) DI is very important there. In general scalajs can compile all scala code (incl.macroses) except for runtime reflection and some java classes.

OlegIlyenko commented 10 years ago

Hi Anton. Thanks for the suggestion, sounds very interesting. It would be nice to bring scaldi to the browser realm. I think usage of the reflection can be a problem. in general I can extract most of it in separate module. Actually there is only one place where it actually used, namely ReflectionBinder which is pretty isolated part of the library. But library will still heavily relay on the TypeTag and Type in order to define the bindings and inject them. Both of these traits come from the reflection API, so they probably will not compile with scalajs.

That said, I still would like to research it a little bit deeper. Maybe there is a possibility to make it work with scalajs. So I will do it as soon as I will get some time.

svenwiegand commented 8 years ago

Any updates on this?

OlegIlyenko commented 8 years ago

No unfortunately there is no progress on this yet.