Skip to content

bloop does not see a dependent project that contains only resources #2678

@UralRoman

Description

@UralRoman

Hello! I have build.sbt file

ThisBuild / scalaVersion := "3.3.6"

lazy val projectA = project.in(file("project-a"))

lazy val projectB = project.in(file("project-b")).dependsOn(projectA)

projectA have only one file text.txt in src/main/resources.
I want to open this file inside projectB.

import scala.io.Source

@main
def main() = 
  val text = Source.fromResource("text.txt").getLines().mkString
  println(text)

It works if I run "sbt projectB/run". But if i run "bloop run projectB", project crashes with error "java.io.FileNotFoundException".
The error disappears if I create an empty class in projectA. I don't want to create a useless class just to make bloop work.
Can you help me solve this problem?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions