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
The Scala spec states that identifiers that contain the $ characters are reserved for compiler-generated names. Any other use has undefined behavior.
One of these (object $) caused a bug in scala/scala3#19702. We are trying to add an ad-hoc patch to support these broken classes from Ammonite. But this patch cannot be guaranteed to work forever and there is no guarantee that these definitions do not introduce more issues (that may not be by the compiler).
Added 3.4.2 to targets in a fairly straightforward, formulaic fashion.
3.4.0 and 3.4.1, for good reason, fail to parse `$` as a class file, but
a [temporary ad-hoc workaround was added in
3.4.2](scala/scala3#19705), so this needn't
block 3.4 support for now. Reliance on `object $` still needs to be
[fixed in
Ammonite](#1395).
Several internals changes required fixes also; I used the most obvious
solution (e.g. if Y extends X and Y is now private, use X instead), but
someone who knows more might want to read it over.
Tests pass on my machine for 3.3 and 3.4.2 (under Java 21).
If accepted, this patch would supersede
#1394
The Scala spec states that identifiers that contain the
$
characters are reserved for compiler-generated names. Any other use has undefined behavior.One of these (
object $
) caused a bug in scala/scala3#19702. We are trying to add an ad-hoc patch to support these broken classes from Ammonite. But this patch cannot be guaranteed to work forever and there is no guarantee that these definitions do not introduce more issues (that may not be by the compiler).The following names can cause undefined behavior:
object $
,package $file
,package $exec
,package $ivy
,package $url
,package $stub
,package $cp
,package $plugin
,package $repo
. These are defined in https://github.com/com-lihaoyi/Ammonite/blob/main/amm/interp/api/src/main/scala/ammonite/Stubs.scala. There might be more problematic names.The only possible solution is to deprecate these objects and migrate to some sound naming scheme.
The text was updated successfully, but these errors were encountered: