Issue importing user written packages with Scala plugin

Answered

Hello, I am not able to import very basic package definitions in Scala. Could anyone advise what I could be doing wrong? I have already tried to "Invalidate Caches / Reset", create new versions of the projects yet it still does not seem to work.

In the example below I have created a package folder called greek with classes alpha and beta. Within the Editor I am able to code the new classes however when I try to run the Scala worksheet I receive the error saying the package cannot be found.

0
3 comments

You need to place worksheet file into source directory: place it into scala folder.

0
Avatar
Permanently deleted user

Thanks for the suggestion Andrey. I seemed to have solved it for now by doing some combination of Compile, Invalidate, Closing IntelliJ on top of a clean install ...

Does sbt know that it needs to compile any dependent packages if they are not compiled already?

0

It should compile all sources located under source directories. SBT supports incremental compilation when ic compiles only files changes since last compilation. Refer to SBT documentation for more information.

0

Please sign in to leave a comment.