Ólafur Páll Geirsson
Ólafur Páll Geirsson
We use a similar approach in scalafix with `Patch` and it's been working quite great, it helps composability a lot. I've actually wondered if scalagen can build on top of...
> However, I do not believe we need to worry about formatting/trivia this intermediate step. It is not source code. It's not a requirement to preserve trivia with scalafix, you...
Question is whether we want to give it such a prominent location on the website
In sbt you can use `FileFunction.cached` to avoid repeated incremental work http://www.scala-sbt.org/1.x/docs/Faq.html#How+can+a+task+avoid+redoing+work+if+the+input+files+are+unchanged%3F
The state-of-the-art here is using sbt-release-early + Travis build stages implemented in https://github.com/scalameta/language-server/pull/46 and https://github.com/scalameta/language-server/pull/50 I can help with this once we want to publish pre-releases on merge.
The scala language spec does not permit annotations on package objects https://www.scala-lang.org/files/archive/spec/2.11/09-top-level-definitions.html#package-objects Interestingly however, `scala.meta.Pkg.Object` has a field for annotations https://github.com/scalameta/scalameta/blob/d4822c8758e108bc1825c0f0f6856f86019c7262/scalameta/trees/shared/src/main/scala/scala/meta/Trees.scala#L314 but it's not used in the parser https://github.com/scalameta/scalameta/blob/d4822c8758e108bc1825c0f0f6856f86019c7262/scalameta/parsers/shared/src/main/scala/scala/meta/internal/parsers/ScalametaParser.scala#L3402 There...
> Yeah, we could even explore expanding based on comments. I think we should use comments as a last resort. I would prefer to explore build configuration first.
In scalafix we use comments to suppress false positives instead of annotations precisely because it's possible to comment on any syntax. If you think comments are better then don't mind...
Sidenote: it would be even better to get range positions if possible. It's probably not much more work compared to adding offset positions.
Another alternative solution would be to add a new visitor API to construct TOML nodes, which the parser would use instead of constructing `toml.Value._` nodes directly. ```scala class TomlVisitor[T] {...