The aliases ("abbreviations") given to command line options in dotty/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala by withAbbreviation do not appear to be understood when specified on the command line.
I believe this is the cause of the community build test failures in #10733.
This also means that any such aliases added for backward compatibility as part of the recent compiler flags cleanup (#10236) may not be functional.
A couple of examples:
$ scalac -version
Scala compiler version 3.0.0-M3-bin-SNAPSHOT-git-bbd092b -- Copyright 2002-2020, LAMP/EPFL
$ scalac --version
bad option '--version' was ignored
Usage: scalac <options> <source files>
... help text elided ...
$ ls -l
total 8
-rw-r--r-- 1 tgrigg tgrigg 282 Dec 15 13:25 Test.class
-rw-r--r-- 1 tgrigg tgrigg 259 Dec 15 13:25 Test.tasty
$ dotc -from-tasty Test.tasty
$ ls -l
total 8
-rw-r--r-- 1 tgrigg tgrigg 282 Dec 15 13:26 Test.class
-rw-r--r-- 1 tgrigg tgrigg 259 Dec 15 13:26 Test.tasty
$ dotc --from-tasty Test.tasty
bad option '--from-tasty' was ignored
-- [E080] Syntax Error: Test.tasty:1:0 -----------------------------------------
1 |\�����]������������ASTs�<empty>�Test�<init>�java�lang����Object���?����Unit�scala�SourceFile�annotation����internal�������String���?�����Test.scala�Positions�Comments����6��������p�Uu�6����)u�6� ��u�6���p�U3�@��������������ؠƆ���
|^^^
|Expected a toplevel definition
-- Error: Test.tasty:1:6 -------------------------------------------------------
1 |\�����]������������ASTs�<empty>�Test�<init>�java�lang����Object���?����Unit�scala�SourceFile�annotation����internal�������String���?�����Test.scala�Positions�Comments����6��������p�Uu�6����)u�6� ��u�6���p�U3�@��������������ؠƆ���
| ^
| illegal character '\u0000'
... more errors elided ...
This is particularly important, because recently the semanticdb flag was changed from -Ysemanticdb to -Xsemanticdb without any kind of notification for the Metals team. As the abbreviations are broken this caused a number of issues both in Bloop and sbt. That flag is only really used by Metals and the lack of communication is something that is really becoming a problem for us. It has become a pattern that changes are being done, especially the ones related to parsing and Metals, without any notification.
Please, let us know when something might change that is related either to Metals or syntax, as it would help us avoid any kind of surprise as we had with the 3.0.0-M3 release.
Also hit this in MiMa, where I found -cp didn't work despite how the code reads (I switched to -classpath).
@tgodzik the best way to avoid regressions like this would be to get metals in our community build: https://github.com/lampepfl/dotty/tree/master/community-build, it's a bit trickier than other projects since I assume only some of the subprojects can be compiled with dotty and the rest have to be compiled with scala 2 due to dependencies on scalameta, but it should be doable.
We've been actually talking with @romanowski about it and we would also need to at least run a subset of tests related to Scala 3. We'll probably look into it next year.
This is particularly important, because recently the semanticdb flag was changed from
-Ysemanticdbto-Xsemanticdbwithout any kind of notification for the Metals team. As the abbreviations are broken this caused a number of issues both in Bloop and sbt. That flag is only really used by Metals and the lack of communication is something that is really becoming a problem for us. It has become a pattern that changes are being done, especially the ones related to parsing and Metals, without any notification.
I take full blame for this one. I apologize for how it happened. I was the one to perform the changes, and blindly trusted the abbreviation mechanism not to break tools, including Metals. Then I didn't make a particular effort to communicate the change nor to make sure it appeared in the release notes. I'm sorry.
Most helpful comment
This is particularly important, because recently the semanticdb flag was changed from
-Ysemanticdbto-Xsemanticdbwithout any kind of notification for the Metals team. As the abbreviations are broken this caused a number of issues both in Bloop and sbt. That flag is only really used by Metals and the lack of communication is something that is really becoming a problem for us. It has become a pattern that changes are being done, especially the ones related to parsing and Metals, without any notification.Please, let us know when something might change that is related either to Metals or syntax, as it would help us avoid any kind of surprise as we had with the 3.0.0-M3 release.