Newby Scala question: can I use your library written in Scala 2 in my project I want to write in Scala 3?

I want to use the Daml LF Interface library which says was written in Scala 2.13:

For my code, I would prefer Scala 3 since it’s advertised as superior.

First, I should mention that you probably want api-type-signature instead beyond a certain version of Daml. This is the new name of the interface library.

Second, I’m sure you saw this if you reviewed the prior discussions, but api-type-signature is technically an internal library, though, again, you probably saw my argument why it is worth using anyway.

Finally, to answer your question, as explained in Scala 3 docs, it is possible to depend on a Scala 2.13 library from a Scala 3 project. I suggest following this path.

1 Like

I believe this is valid from Daml 2.6, to be clearer. The library has been renamed to avoid confusion with Daml interfaces, which the library is capable of handling but are not its only focus.


Thank you, Stephen!