Skip to content

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

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

Closed
olafurpg opened this issue Jun 15, 2017 · 1 comment
Closed

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

olafurpg opened this issue Jun 15, 2017 · 1 comment
Assignees

Comments

@olafurpg
Copy link
Contributor

$ 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

@liufengyun
Copy link
Contributor

I'm looking at this. Will propose a PR soon.

@liufengyun liufengyun self-assigned this Jun 22, 2017
felixmulder added a commit that referenced this issue Jun 27, 2017
Fix #2759: support params like @file.txt for dotc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants