Skip to content

Add SemanticDB extractor #7379

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

Merged
merged 107 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
58a572e
Add -Ysemanticdb option
odersky Oct 7, 2019
493aabd
First version of traverser for SemanticDB extraction
odersky Oct 7, 2019
ffa53d0
Add dependency-free serializer for SemanticDB symbol occurrences.
Oct 7, 2019
9fbf3f0
Add ScalaSettings for sourceroot and targetroot
odersky Oct 7, 2019
6217c29
Add helper method to write SemanticDB files
Oct 7, 2019
fe02843
Write SemanticDB file
odersky Oct 7, 2019
39f244b
Integrate ExtractSsemanticDB in Compiler
odersky Oct 8, 2019
004b6c4
Extract only under -Ysemanticdb
odersky Oct 8, 2019
8caff2d
Refactor path logic and fix symbol names
odersky Oct 8, 2019
c7e13cf
Fixes to localIdx and more comments
odersky Oct 8, 2019
53e7918
Absolutize and normalize paths before writing SemanticDB.
Oct 8, 2019
6921db7
Use buiders instead of String +
odersky Oct 8, 2019
fa5009d
Refine exclusion criteria
odersky Oct 9, 2019
163f086
Polishings
odersky Oct 9, 2019
dfe4d92
Add test case
odersky Oct 9, 2019
1b397e4
Omit definitions with offset positions
odersky Oct 9, 2019
e9cf568
Fix variable references
odersky Oct 9, 2019
5c416d3
Factor out NamedDefTrees from DefTrees
odersky Oct 9, 2019
71f9451
Add test suite for SemanticDB extraction
Oct 9, 2019
e11844b
Move semanticdb-extract test file to new expect test suite
Oct 9, 2019
327f764
update docs, pretty printer and remove Main test
bishabosha Oct 11, 2019
9875f14
add more tests, skip module var in semantic db generation
bishabosha Oct 16, 2019
42e4649
fix overload order and indexing, remove references at package defs
bishabosha Oct 17, 2019
05b41b4
register usage for path parts of an import statement
bishabosha Oct 17, 2019
17bdf10
self symbol is a local symbol
bishabosha Oct 17, 2019
69274af
visit symbol annotations if not from scala.annotation.internal package
bishabosha Oct 17, 2019
36e14b3
do not semanticdb symbol occurences for wildcards
bishabosha Oct 18, 2019
df24fbc
don't emit occurrences for anonymous symbols
bishabosha Oct 18, 2019
3c0a4a7
Ignore noise in templates and children of synthetics
bishabosha Oct 21, 2019
c20f2d1
append _empty_. if empty package is owner
bishabosha Oct 21, 2019
8775d51
do not append package objects to symbols
bishabosha Oct 21, 2019
2137141
exclude default getters
bishabosha Oct 21, 2019
c2054dd
revert exclude package objects
bishabosha Oct 21, 2019
457cf2c
emit public vals without parens
bishabosha Oct 21, 2019
c86266d
eliminate traversing select qualifier of _root_.scala.Predef
bishabosha Nov 5, 2019
1540898
Add many tests
bishabosha Nov 5, 2019
9caa5c4
Add semanticdb todolist; only traverse paths if qualifier is not a pa…
bishabosha Nov 6, 2019
0b2e581
unescape unicode in names, fix overload bug
bishabosha Nov 6, 2019
5bc5a7d
all package objects are named 'package'
bishabosha Nov 6, 2019
61d0820
restore scala.Predef.classOf().
bishabosha Nov 6, 2019
f753129
update todo
bishabosha Nov 6, 2019
6c91041
avoid blacklisting scala.Predef and scala.StringContext
bishabosha Nov 6, 2019
3744e19
Suspend test after rebase
bishabosha Nov 7, 2019
b63908b
Better java symbols
bishabosha Nov 7, 2019
1f24961
add named arguments tests
bishabosha Nov 7, 2019
b114023
add remaining tests and update todo
bishabosha Nov 7, 2019
9e73299
fix special case of _root_ and _empty_
bishabosha Nov 8, 2019
1e3bc91
remove testfilter, remove compilation warnings
bishabosha Nov 8, 2019
78b48e4
Introduce semanticdb Scala object for common definitions
bishabosha Nov 12, 2019
3b78f26
move java sources to test-bootstrapped
bishabosha Nov 12, 2019
4c8aed0
only skip package symbols when printing expect output
bishabosha Nov 12, 2019
20a4ccf
restructure semanticdb package
bishabosha Nov 12, 2019
945bdf7
serialise SymbolInformation, filter out primary ctor in expect test o…
bishabosha Nov 12, 2019
d89586a
improve safety of semanticdb serialisation classes
bishabosha Nov 13, 2019
69e4121
add occurences for private within
bishabosha Nov 13, 2019
2af8a3a
Traverse all paths
bishabosha Nov 13, 2019
f62ce3f
unique package objects for top level definitions
bishabosha Nov 13, 2019
801fa97
add props and kind to all SymbolInformation
bishabosha Nov 14, 2019
637293c
change format of expect test output
bishabosha Nov 14, 2019
3bb757d
add metac.expect test
bishabosha Nov 14, 2019
f54a997
optimise some definitions
bishabosha Nov 15, 2019
cbaf51e
don't make symbols or occurrences for constructors of objects
bishabosha Nov 15, 2019
17a4e47
abstract, and var method for SymbolInformation
bishabosha Nov 15, 2019
66edfef
emit uses of setters instead of the getter
bishabosha Nov 15, 2019
b0a73ee
emit SymbolInfo for ctor params
bishabosha Nov 15, 2019
65d8eb9
support trait kind in SymbolInformation
bishabosha Nov 15, 2019
1b6d7a9
correct arrow direction in metac occurrences, include source snippet,…
bishabosha Nov 15, 2019
02747cd
test collective extension methods with more than one method
bishabosha Nov 16, 2019
7145d0a
typeref to tparam in ctor refers to class tparam instead
bishabosha Nov 16, 2019
6f7fbe6
do not taverse synthetic import in enum
bishabosha Nov 16, 2019
e8e30a6
Filter in enums and enumValues.register
bishabosha Nov 16, 2019
303dcb6
optimise some methods
bishabosha Nov 16, 2019
711ac18
dont define typarams for non primary ctors; remove refs to ctor tparams
bishabosha Nov 16, 2019
f337a6e
method params are never val/var
bishabosha Nov 16, 2019
48be9dd
add more enum tests
bishabosha Nov 16, 2019
1924ea5
remove special case for dollarvalues in enum companion
bishabosha Nov 17, 2019
ddae2a7
refactor definitions
bishabosha Nov 17, 2019
ba0f8cb
reformat metac.expect
bishabosha Nov 17, 2019
22707e3
only traverse self tpt if it has span
bishabosha Nov 18, 2019
18d003b
params of anonymous funs are emitted
bishabosha Nov 18, 2019
83ae6da
more symbols in symbol section
bishabosha Nov 18, 2019
fef188c
better properties for symbols
bishabosha Nov 18, 2019
9bcf227
adjust extension method syntax
bishabosha Nov 18, 2019
6e731a2
More definitions in Symbols section. Rename Scala to Scala3
bishabosha Nov 19, 2019
b31542b
add kind queries to Scala3.infoOps
bishabosha Nov 19, 2019
9cb1d0a
inspect inside definitions with a numbered empty name
bishabosha Nov 19, 2019
a051a03
define anon classes
bishabosha Nov 20, 2019
eb3ba6c
refactor tools
bishabosha Nov 20, 2019
6aea653
Dont make occurrences for setters, test def with explicit setter syntax
bishabosha Nov 20, 2019
d774f5a
better support paths and pattern defs
bishabosha Nov 20, 2019
69f3d60
exclude use occurrences of annotation constructors
bishabosha Nov 20, 2019
dc1e127
traverse parents if span exists
bishabosha Nov 21, 2019
298b2b4
implicit objects have correct props
bishabosha Nov 21, 2019
afff105
support pattern vals
bishabosha Nov 21, 2019
057b158
update TODO
bishabosha Nov 21, 2019
bfbe08d
Resupport Ident patterns in pattern defs
bishabosha Nov 21, 2019
0bf31a9
Support named arguments
bishabosha Nov 21, 2019
4a3071f
syntax changes and test result improvements
bishabosha Dec 10, 2019
ace6257
delete dead code
bishabosha Dec 12, 2019
196c90c
output whole file and not diff in failure case
bishabosha Dec 12, 2019
f82a8c7
remove special case for Annotated, update expect for anon class change
bishabosha Dec 13, 2019
25fdafa
refactor names and remove dead code
bishabosha Dec 13, 2019
6a47cf6
drop -scansource setting
bishabosha Dec 13, 2019
31aff29
DRY SemanticdbTests
bishabosha Dec 13, 2019
740c864
remove dependency on google diffutil
bishabosha Dec 13, 2019
f02321a
rename target setting to semanticdbTarget
bishabosha Dec 13, 2019
d594863
compile javacp files as part of expect tests
bishabosha Dec 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 209 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# License notice for the ScalaPB protobuf library

The Dotty codebase contains parts which are derived from
[the ScalaPB protobuf library](https://github.com/scalapb/scalapb).
We include the text of the original license below:

```
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Compiler {
List(new YCheckPositions) :: // YCheck positions
List(new Staging) :: // Check PCP, heal quoted types and expand macros
List(new sbt.ExtractDependencies) :: // Sends information on classes' dependencies to sbt via callbacks
List(new semanticdb.ExtractSemanticDB) :: // Extract info into .semanticdb files
List(new PostTyper) :: // Additional checks and cleanups after type checking
List(new sbt.ExtractAPI) :: // Sends a representation of the API of classes to sbt via callbacks
List(new SetRootTree) :: // Set the `rootTreeOrProvider` on class symbols
Expand Down
59 changes: 27 additions & 32 deletions compiler/src/dotty/tools/dotc/ast/Trees.scala
Original file line number Diff line number Diff line change
Expand Up @@ -332,53 +332,44 @@ object Trees {
def namedType: NamedType = tpe.asInstanceOf[NamedType]
}

/** Tree defines a new symbol and carries modifiers.
* The position of a MemberDef contains only the defined identifier or pattern.
* The envelope of a MemberDef contains the whole definition and has its point
* on the opening keyword (or the next token after that if keyword is missing).
*/
abstract class MemberDef[-T >: Untyped](implicit @constructorOnly src: SourceFile) extends NameTree[T] with DefTree[T] {
type ThisTree[-T >: Untyped] <: MemberDef[T]

def rawComment: Option[Comment] = getAttachment(DocComment)

def setComment(comment: Option[Comment]): this.type = {
comment.map(putAttachment(DocComment, _))
this
}
abstract class NamedDefTree[-T >: Untyped](implicit @constructorOnly src: SourceFile) extends NameTree[T] with DefTree[T] {
type ThisTree[-T >: Untyped] <: NamedDefTree[T]

/** The position of the name defined by this definition.
* This is a point position if the definition is synthetic, or a range position
* if the definition comes from source.
* It might also be that the definition does not have a position (for instance when synthesized by
* a calling chain from `viewExists`), in that case the return position is NoSpan.
* Overridden in Bind
*/
def nameSpan: Span =
if (span.exists) {
val point = span.point
if (rawMods.is(Synthetic) || name.toTermName == nme.ERROR) Span(point)
else {
val realName = name.stripModuleClassSuffix.lastPart.toString
val nameStart =
if (point != span.start) point
else {
// Point might be too far away from start to be recorded. In this case we fall back to scanning
// forwards from the start offset for the name.
// Note: This might be inaccurate since scanning might hit accidentally the same
// name (e.g. in a comment) before finding the real definition.
// To make this behavior more robust we'd have to change the trees for definitions to contain
// a fully positioned Ident in place of a name.
val contents = if source.exists then source.content() else Array.empty[Char]
val idx = contents.indexOfSlice(realName, point)
if (idx >= 0) idx
else point // use `point` anyway. This is important if no source exists so scanning fails
}
Span(point, point + realName.length, point)
}
}
else span
}

/** Tree defines a new symbol and carries modifiers.
* The position of a MemberDef contains only the defined identifier or pattern.
* The envelope of a MemberDef contains the whole definition and has its point
* on the opening keyword (or the next token after that if keyword is missing).
*/
abstract class MemberDef[-T >: Untyped](implicit @constructorOnly src: SourceFile) extends NamedDefTree[T] {
type ThisTree[-T >: Untyped] <: MemberDef[T]

def rawComment: Option[Comment] = getAttachment(DocComment)

def setComment(comment: Option[Comment]): this.type = {
comment.map(putAttachment(DocComment, _))
this
}
}

/** A ValDef or DefDef tree */
abstract class ValOrDefDef[-T >: Untyped](implicit @constructorOnly src: SourceFile) extends MemberDef[T] with WithLazyField[Tree[T]] {
type ThisTree[-T >: Untyped] <: ValOrDefDef[T]
Expand Down Expand Up @@ -705,10 +696,13 @@ object Trees {

/** name @ body */
case class Bind[-T >: Untyped] private[ast] (name: Name, body: Tree[T])(implicit @constructorOnly src: SourceFile)
extends NameTree[T] with DefTree[T] with PatternTree[T] {
extends NamedDefTree[T] with PatternTree[T] {
type ThisTree[-T >: Untyped] = Bind[T]
override def isType: Boolean = name.isTypeName
override def isTerm: Boolean = name.isTermName

override def nameSpan: Span =
if span.exists then Span(span.start, span.start + name.toString.length) else span
}

/** tree_1 | ... | tree_n */
Expand Down Expand Up @@ -938,6 +932,7 @@ object Trees {
type NameTree = Trees.NameTree[T]
type RefTree = Trees.RefTree[T]
type DefTree = Trees.DefTree[T]
type NamedDefTree = Trees.NamedDefTree[T]
type MemberDef = Trees.MemberDef[T]
type ValOrDefDef = Trees.ValOrDefDef[T]
type LazyTree = Trees.LazyTree[T]
Expand Down Expand Up @@ -1439,13 +1434,13 @@ object Trees {
this(x, trees)
case UnApply(fun, implicits, patterns) =>
this(this(this(x, fun), implicits), patterns)
case tree @ ValDef(name, tpt, _) =>
case tree @ ValDef(_, tpt, _) =>
implicit val ctx = localCtx
this(this(x, tpt), tree.rhs)
case tree @ DefDef(name, tparams, vparamss, tpt, _) =>
case tree @ DefDef(_, tparams, vparamss, tpt, _) =>
implicit val ctx = localCtx
this(this(vparamss.foldLeft(this(x, tparams))(apply), tpt), tree.rhs)
case TypeDef(name, rhs) =>
case TypeDef(_, rhs) =>
implicit val ctx = localCtx
this(x, rhs)
case tree @ Template(constr, parents, self, _) if tree.derived.isEmpty =>
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/ast/untpd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
case class Export(expr: Tree, selectors: List[ImportSelector])(implicit @constructorOnly src: SourceFile) extends Tree

case class ImportSelector(imported: Ident, renamed: Tree = EmptyTree, bound: Tree = EmptyTree)(implicit @constructorOnly src: SourceFile) extends Tree {
// TODO: Make bound a typed tree?

/** It's a `given` selector */
val isGiven: Boolean = imported.name.isEmpty
Expand Down
3 changes: 3 additions & 0 deletions compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class ScalaSettings extends Settings.SettingGroup {
val javabootclasspath: Setting[String] = PathSetting("-javabootclasspath", "Override java boot classpath.", Defaults.javaBootClassPath) withAbbreviation "--java-boot-class-path"
val javaextdirs: Setting[String] = PathSetting("-javaextdirs", "Override java extdirs classpath.", Defaults.javaExtDirs) withAbbreviation "--java-extension-directories"
val sourcepath: Setting[String] = PathSetting("-sourcepath", "Specify location(s) of source files.", Defaults.scalaSourcePath) withAbbreviation "--source-path"
val sourceroot: Setting[String] = PathSetting("-sourceroot", "Specify workspace root directory", ".")
val semanticdbTarget: Setting[String] = PathSetting("-semanticdb-target", "Specify an alternative output directory for SemanticDB files", "")

val classpath: Setting[String] = PathSetting("-classpath", "Specify where to find user class files.", defaultClasspath) withAbbreviation "-cp" withAbbreviation "--class-path"
val outputDir: Setting[AbstractFile] = OutputSetting("-d", "directory|jar", "destination for generated classfiles.",
Expand Down Expand Up @@ -150,6 +152,7 @@ class ScalaSettings extends Settings.SettingGroup {
val YdumpSbtInc: Setting[Boolean] = BooleanSetting("-Ydump-sbt-inc", "For every compiled foo.scala, output the API representation and dependencies used for sbt incremental compilation in foo.inc, implies -Yforce-sbt-phases.")
val YcheckAllPatmat: Setting[Boolean] = BooleanSetting("-Ycheck-all-patmat", "Check exhaustivity and redundancy of all pattern matching (used for testing the algorithm)")
val YretainTrees: Setting[Boolean] = BooleanSetting("-Yretain-trees", "Retain trees for top-level classes, accessible from ClassSymbol#tree")
val Ysemanticdb: Setting[Boolean] = BooleanSetting("-Ysemanticdb", "Store information in SemanticDB")
val YshowTreeIds: Setting[Boolean] = BooleanSetting("-Yshow-tree-ids", "Uniquely tag all tree nodes in debugging output.")

val YprofileEnabled: Setting[Boolean] = BooleanSetting("-Yprofile-enabled", "Enable profiling.")
Expand Down
Loading