Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail while importing file with - in the name. #2458

Closed
jilen opened this issue Apr 25, 2023 · 2 comments · Fixed by #2492
Closed

Build fail while importing file with - in the name. #2458

jilen opened this issue Apr 25, 2023 · 2 comments · Fixed by #2492
Milestone

Comments

@jilen
Copy link
Contributor

jilen commented Apr 25, 2023

Version: 0.11.0-M8

For example

foo-bar.sc

import mill.scalalib._
trait FooBar extends ScalaModule

build.sc

import $file.`foo-bar`, `foo-bar`.FooBar

object `foo-bar` extends FooBar {
  def scalaVersion = "3.2.2"
}
@jilen
Copy link
Contributor Author

jilen commented Apr 25, 2023

There are invlaid build scripts generated in out/mill-build with content

object foo-bar extends foo-bar
class foo-bar extends _root_.mill.main.RootModule.Foreign(Some(_root_.mill.define.Segments.labels("foreign-modules", "foo-bar"))){

//MILL_ORIGINAL_FILE_PATH=/tmp/mill-test/foo-bar.sc
//MILL_USER_CODE_START_MARKER
trait FooBar extends ScalaModule

}

@lefou
Copy link
Member

lefou commented Apr 25, 2023

lefou added a commit that referenced this issue May 2, 2023
lihaoyi added a commit that referenced this issue May 21, 2023
Fixes #2458

Covered by `integration/feature/non-identifier-import`

---------

Co-authored-by: Your Name <[email protected]>
@lefou lefou added this to the 0.11.0-M10 milestone May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants