mirror of
https://github.com/enso-org/enso.git
synced 2024-12-28 14:11:56 +03:00
e171fba301
Implement new Enso documentation parser; remove old Scala Enso parser. Performance: Total time parsing documentation is now ~2ms. # Important Notes - Doc parsing is now done only in the frontend. - Some engine tests had never been switched to the new parser. We should investigate tests that don't pass after the switch: #5894. - The option to run the old searcher has been removed, as it is obsolete and was already broken before this (see #5909). - Some interfaces used only by the old searcher have been removed.
22 lines
582 B
Scala
22 lines
582 B
Scala
import sbt._
|
|
import sbt.Keys._
|
|
|
|
object RecompileParser {
|
|
|
|
/** Ensures that the project is recompiled whenever the project from
|
|
* `syntaxDefinition` is changed. Should be attached to the `compile` task as
|
|
* a dependency.
|
|
*/
|
|
def run(syntaxDefinition: Project) =
|
|
Def.taskDyn {
|
|
val parserCompile =
|
|
(syntaxDefinition / Compile / compileIncremental).value
|
|
if (parserCompile.hasModified) {
|
|
Def.task {
|
|
streams.value.log.info("Parser changed, forcing recompilation.")
|
|
clean.value
|
|
}
|
|
} else Def.task {}
|
|
}
|
|
}
|