I have a Scala development environment with Metals
and a build.sbt
. Isabelle provides its own wrappers for Scala tools such as scalac
, scala
, 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?
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?
E.g. if you want to edit Isabelle/Scala sources in an IDE then there's a better way.
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?
Yes. Note that:
sbt
is not a supported target for scala_project
, but could potentially made to workscala_project
generates a standard maven or gradle projects for the Isabelle sources-L
options so the generated project consists of symlinks instead of copies (does not work on windows)The project generated via that tool works with any IDE that supports gradle or maven properly (Metals does not, sadly).
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