sbt/buildfile/src
Martin Duhem 79dbcd2ff4
Support minus sign in project names
Previously, sbt would crash when attempting to load a build where
projects had minus signs (`-`) in their name.

For instance, when trying to load a project defined like this:

    lazy val `my-project` = project

After compilation, this definition looks somewhat like this

    val my$minusproject$lzy1 = ...

sbt was attempting to retrieve the original definition (without the $lzy
suffix) by taking the mangled name up to the first `$`. Unfortunately,
this approach does not work when the name includes special characters
like a minus sign, because these will be prefixed with `$` as well. In
the current example, sbt would then try to find the member named `my`,
fail, and crash.

This patch fixes the issue by using the "underlying" name, which is the
name without the additional information.
2025-06-26 10:58:11 +02:00
..
main/scala/sbt/internal Support minus sign in project names 2025-06-26 10:58:11 +02:00
test remove unnecessary `case` 2025-02-22 08:48:29 +09:00