Skip to content

Expanding cli args with dotc @file.txt is unsupported #2759

Closed
@olafurpg

Description

@olafurpg
$ cat foo.args
-help
$ scalac @foo.args
Usage: scalac <options> <source files>
where possible standard options include:
  -Dproperty=value                     Pass -Dproperty=value directly to the runtime system.
...
$ dotc @foo.args
Exception in thread "main" java.lang.UnsupportedOperationException: class dotty.tools.dotc.config.CompilerCommand$.expandArg
	at dotty.tools.dotc.util.DotClass.unsupported(DotClass.scala:10)

It would be nice if expanding args from a file was possible. This feature is used with scalac to run the compiler benchmark on real-world projects, see scala/scala-dev#392

See:
https://github.com/lampepfl/dotty/blob/8ddfcaf1667b8972e70e769feffef240ee0bbc10/compiler/src/dotty/tools/dotc/config/CompilerCommand.scala#L40

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions