You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to create a package with a name including the string scala-library in it, results in a failure when trying to use that package from another project.
Details
A "library" project defined as
// build.sbtimportsbt.filelazyvalroot=Project(id ="my-scala-library", base = file("."))
.settings(
name :="my-scala-library-that-fails",
scalaVersion :="2.13.12",
organization :="com.myorg",
)
❯ sbt compile
[info] welcome to sbt 1.9.9 (Homebrew Java 21.0.2)
[info] loading project definition from .../consumer/project
[info] loading settings for project foo from build.sbt ...
[info] set current project to foo (in build file:.../consumer/)
[info] Executing in batch mode. For better performance use sbt's shell
[info] compiling 1 Scala source to .../consumer/target/scala-2.13/classes ...
[error] .../consumer/src/main/scala/foo/Foo.scala:3:12: object myorg is not a member of package com
[error] import com.myorg.Lib
[error] ^
[error] .../consumer/src/main/scala/foo/Foo.scala:7:13: not found: value Lib
[error] println(Lib.MyFunc())
[error] ^
[error] two errors found
[error] (Compile / compileIncremental) Compilation failed
expectation
I'm able to import symbols from the package
notes
I tried looking if this behavior is intended, and could not find anything.
If the package name for the library is something else like my-scala-lib-that-fails, then it works without a problem.
The text was updated successfully, but these errors were encountered:
@ddl-sacuna Thanks for the report! I think this is a bug, but it might be tricky to fix if it's somewhere deeply rooted in layered classloader logic or something because at that point all we got would be JAR names.
steps
Trying to create a package with a name including the string
scala-library
in it, results in a failure when trying to use that package from another project.Details
A "library" project defined as
with just one file
and a project trying to use it
And running
on the library, and
on the consumer results in a failure
repro.tar.gz
problem
expectation
I'm able to import symbols from the package
notes
I tried looking if this behavior is intended, and could not find anything.
If the package name for the library is something else like
my-scala-lib-that-fails
, then it works without a problem.The text was updated successfully, but these errors were encountered: