Skip to content

Export diagnostics (including unused warnings) to SemanticDB #17835

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 30 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
75e6bb6
Export diagnostics (including unused warnings) to SemanticDB
tanishiking Jun 5, 2023
c5a80c4
Add -Wunused:all to the compiler options to see Semanticdb export unused
tanishiking Jun 5, 2023
e1d0ec9
Add some comments
tanishiking Jun 5, 2023
f17fb5f
ExtractSemanticDB.PostInlining now update the .semanticdb file on disk
tanishiking Jun 27, 2023
d2b54c2
Parallelize read/write SemanticDB
tanishiking Jul 19, 2023
56c5909
Run AppendDiagnostics phase after crossVersionChecks
tanishiking Jul 19, 2023
50e0fd2
[WIP] Don't parse TextDocuments in AppendDiagnostics
tanishiking Jul 20, 2023
2babbc4
Remove unnecessary suffix
tanishiking Jul 20, 2023
5186b62
Remove unused local + Context
tanishiking Jul 20, 2023
66a5306
Merge branch 'main' into export-diagnostics
tanishiking Jul 20, 2023
a414fae
Fix presentation compiler
tanishiking Jul 20, 2023
d5065ec
Parse TextDocuments instead of using `com.google.protobuf`
tanishiking Jul 25, 2023
d7258b4
Remove Context from relPath and so on
tanishiking Jul 25, 2023
4b5d3e7
Remove from parallel
tanishiking Jul 25, 2023
3008ed8
Remove ancii color code from SemanticDB
tanishiking Jul 25, 2023
c9de8e2
Extractor.extract uses unitCtx
tanishiking Jul 26, 2023
40a2a00
Remove Context parameter from Scala3.range and toSemanticDbDiagnositcs
tanishiking Jul 26, 2023
7b29f4c
Remove unused
tanishiking Jul 27, 2023
4f6a092
Revert "Remove from parallel"
tanishiking Jul 27, 2023
a6dfec2
Merge branch 'main' into export-diagnostics
tanishiking Jul 27, 2023
3daeaa6
Merge branch 'main' into export-diagnostics
tanishiking Sep 21, 2023
499c347
Remove println
tanishiking Sep 21, 2023
71a5cd0
Fix TastyBootstrapTests by adding sharable annotation to regex
tanishiking Sep 22, 2023
b28b425
Merge branch 'main' into export-diagnostics
tanishiking Oct 16, 2023
d54d8a2
Do not run toSemanticDiagnosic in parallel
tanishiking Oct 16, 2023
b8565a0
Fix wrong rebase
tanishiking Oct 16, 2023
2857632
Merge branch 'main' into export-diagnostics
tanishiking Oct 19, 2023
053e644
Restore removed comment
tanishiking Oct 19, 2023
567d486
Fix writesToOutputDir
tanishiking Oct 19, 2023
275e6fa
Uncomment the phase for appending warnings
tanishiking Oct 19, 2023
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
Prev Previous commit
Next Next commit
Fix presentation compiler
  • Loading branch information
tanishiking committed Jul 20, 2023
commit a414fae9a2918a44ce0c08424b9985367551e76b
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ object ExtractSemanticDB:
.resolveSibling(source.name + ".semanticdb")

/** Extractor of symbol occurrences from trees */
private class Extractor extends TreeTraverser:
class Extractor extends TreeTraverser:
import Scala3.{_, given}
given s.SemanticSymbolBuilder = s.SemanticSymbolBuilder()
val synth = SyntheticsExtractor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class SemanticdbTextDocumentProvider(
SourceFile.virtual(filePath.toString, validCode)
)
val tree = driver.currentCtx.run.units.head.tpdTree
val extract = ExtractSemanticDB()
val extractor = extract.Extractor()
val extractor = ExtractSemanticDB.Extractor()
extractor.traverse(tree)(using driver.currentCtx)
val path = workspace
.flatMap { workspacePath =>
Expand Down