8000 Support minus sign in project names by Duhemm · Pull Request #8168 · sbt/sbt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support minus sign in project names #8168

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions buildfile/src/main/scala/sbt/internal/Eval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import dotty.tools.dotc.ast
import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.CompilationUnit
import dotty.tools.dotc.core.Contexts.{ atPhase, Context }
import dotty.tools.dotc.core.{ Flags, Names, Phases, Symbols, Types }
import dotty.tools.dotc.core.{ Flags, NameKinds, Names, Phases, Symbols, Types }
import dotty.tools.dotc.Driver
import dotty.tools.dotc.Run
import dotty.tools.dotc.util.SourceFile
Expand Down Expand Up @@ -391,11 +391,10 @@ object Eval:
case tpd.ValDef(name, tpt, _)
if isTopLevelModule(tree.symbol.owner) && isAcceptableType(tpt.tpe) =>
vals ::= name.mangledString
case tpd.ValDef(name, tpt, _) if name.mangledString.contains("$lzy") =>
val str = name.mangledString
val methodName = str.take(str.indexOf("$"))
case tpd.ValDef(name, tpt, _) if name.is(NameKinds.LazyLocalName) =>
val methodName = name.underlying
val m = tree.symbol.owner.requiredMethod(methodName)
if isAcceptableType(m.info) then vals ::= methodName
if isAcceptableType(m.info) then vals ::= methodName.mangledString
case t: tpd.Template => this((), t.body)
case t: tpd.PackageDef => this((), t.stats)
case t: tpd.TypeDef => this((), t.rhs)
Expand Down
1 change: 1 addition & 0 deletions sbt-app/src/sbt-test/project-load/name-minus/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lazy val `a-funky-name` = project
1 change: 1 addition & 0 deletions sbt-app/src/sbt-test/project-load/name-minus/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> name
0