mirror of https://github.com/sbt/sbt.git
The multi parser had very poor performance if there were many commands. Evaluating the expansion of something like "compile;" * 30 could cause sbt to hang indefinitely. I believe this was due to excessive backtracking due to the optional `(parser <~ semi.?).?` part of the parser in the non-leading semicolon case. I also reworked the implementation so that the multi command now has a name. This allows us to partition the commands into multi and non-multi commands more easily in State while still having multi in the command list. With this change, builds and plugins can exclude the multi parser if they wish. Using the partitioned parsers, I removed the high/priority low priority distinction. Instead, I made it so that the multi command will actually check if the first command is a named command, like '~'. If it is, it will pass the raw command argument with the named command stripped out into the parser for the named command. If that is parseable, then we directly apply the effect. Otherwise we prefix each multi command to the state. |
||
|---|---|---|
| .. | ||
| src/main/scala/sbt/scriptedtest | ||
| NOTICE | ||