mirror of
https://github.com/sbt/sbt.git
synced 2026-08-30 17:54:25 +02:00
196318e6192a167da1359ee77b4d6bba2d7afb06
It was reported in https://github.com/sbt/sbt/issues/4890 that cosmetic white space could cause problems for the paser. I tracked this down to primarily being because of the `val semi = token(OptSpace ~> ';' ~> OptSpace)` line. This would cause excessive backtracking. I added a test for a multi line command with a lot of cosmetic whitespace that was adapted from #4890 except that I made it even more taxing by running adding 100 commands instead of the roughly 10 in the report. Before the parser changes, the test would more or less block indefinitely. I never saw it successfully complete. After these changes, it completes in 30-50ms (which drops to about 2-3 ms if the number of commands is dropped from 100 to 3). I verified manually in a different project that a number of different multi command completions still worked. In particular, I tested that `~foo/test; foo/tes` would expand to `~foo/test; foo/test` which is one of the hardest cases to get right. I also added a few extra test cases for the parser since I wasn't sure what the impact of removing the OptSpace ~> from the semi parser would be.
sbt
sbt is a build tool for Scala, Java, and more.
For general documentation, see http://www.scala-sbt.org/.
sbt 1.x
This is the 1.x series of sbt. The source code of sbt is split across several GitHub repositories, including this one.
- sbt/io hosts
sbt.iomodule. - sbt/util hosts a collection of internally used modules.
- sbt/librarymanagement hosts
sbt.librarymanagementmodule that wraps Ivy. - sbt/zinc hosts Zinc, an incremental compiler for Scala.
- sbt/sbt, this repository hosts modules that implements the build tool.
Other links
- Setup: Describes getting started with the latest binary release.
- FAQ: Explains how to get help and more.
- sbt/sbt-zero-seven: hosts sbt 0.7.7 and earlier versions
Issues and Pull Requests
Please read CONTRIBUTING carefully before opening a GitHub Issue.
The short version: try searching or asking on StackOverflow.
license
See LICENSE.
Languages
Scala
94.5%
Java
3.1%
Shell
1.1%
Batchfile
0.9%
Roff
0.2%
Other
0.1%