Skip to content

Broken compilation when script name equals to library name #3595

@road21

Description

@road21

Version(s)
1.6.1, 1.7.1

Describe the bug
In worksheet mode filename affects compilation.

To Reproduce

  1. Create file zio.sc with code:
//> using dep "dev.zio::zio:2.1.16"

import zio.ZIO
  1. Run: scala-cli zio.sc

Got:

[error] ./zio.sc:4:12
[error] value ZIO is not a member of zio$_
[error] import zio.ZIO
[error]            ^^^

Expected behaviour

No compiler errors.
In non-worksheet mode (if filename is zio.scala) the behavior is as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingscriptingIssues tied to *.sc script inputs.wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions