Stream: General

Topic: How to use Isabelle scalac wrapper in build.sbt


view this post on Zulip Milan Tom (Jan 10 2025 at 12:15):

I have a Scala development environment with Metals and a build.sbt. Isabelle provides its own wrappers for Scala tools such as scalacscala, etc. I have Isabelle added to my path so these can be accessed in the form isabelle scalac from the command-line and the implementations are given in this folder. What do I need to add to my build.sbt to instruct Metals to use these wrappers for compilation and execution rather than the default scala and scalac tools?

view this post on Zulip Fabian Huch (Jan 10 2025 at 12:51):

This is not really a question about Isabelle but to the Metals community. But I have the suspicion that you want to achieve something in Isabelle -- maybe you want to ask about that instead?

view this post on Zulip Fabian Huch (Jan 10 2025 at 12:52):

E.g. if you want to edit Isabelle/Scala sources in an IDE then there's a better way.

view this post on Zulip Milan Tom (Jan 10 2025 at 16:44):

Thanks for the response @Fabian Huch. Apologies for the lack of context. I am working on starting an Isabelle process and communicating with it via the official Isabelle/Scala pipeline, so I require access to the isabelle package in Scala. I have tried using isabelle scala_project with limited success. Is this the better way you are talking about?

view this post on Zulip Fabian Huch (Jan 10 2025 at 17:05):

Yes. Note that:

The project generated via that tool works with any IDE that supports gradle or maven properly (Metals does not, sadly).

view this post on Zulip Milan Tom (Jan 15 2025 at 08:17):

Thanks for the tips. That explains why I was having difficulties using isabelle scala_project (I was using Metals). I can confirm that it is working now.


Last updated: Apr 03 2025 at 20:22 UTC