[ 
https://issues.apache.org/jira/browse/GROOVY-12448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126097#comment-18126097
 ] 

ASF GitHub Bot commented on GROOVY-12448:
-----------------------------------------

codecov-commenter commented on PR #2976:
URL: https://github.com/apache/groovy/pull/2976#issuecomment-6111509270

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2976?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :x: Patch coverage is `77.38095%` with `95 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 72.3054%. Comparing base 
([`a8ab7bc`](https://app.codecov.io/gh/apache/groovy/commit/a8ab7bcb9350c0d8895273ff3abbd6bd288f60e4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`1ce033c`](https://app.codecov.io/gh/apache/groovy/commit/1ce033ccd0c468c1cd04d79285ef3a8bc6a0349e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2976?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...ovy/console/ui/language/ConsoleLanguageHost.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-console%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fconsole%2Fui%2Flanguage%2FConsoleLanguageHost.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnNvbGUvc3JjL21haW4vZ3Jvb3Z5L2dyb292eS9jb25zb2xlL3VpL2xhbmd1YWdlL0NvbnNvbGVMYW5ndWFnZUhvc3QuZ3Jvb3Z5)
 | 76.9231% | [24 Missing and 12 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...y/groovysh/language/GroovyshLanguageSession.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-groovysh%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fgroovysh%2Flanguage%2FGroovyshLanguageSession.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyb292eXNoL3NyYy9tYWluL2dyb292eS9vcmcvYXBhY2hlL2dyb292eS9ncm9vdnlzaC9sYW5ndWFnZS9Hcm9vdnlzaExhbmd1YWdlU2Vzc2lvbi5ncm9vdnk=)
 | 80.3419% | [2 Missing and 21 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...oovy/lsp/internal/engine/GroovyLanguageEngine.java](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-lsp%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Flsp%2Finternal%2Fengine%2FGroovyLanguageEngine.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWxzcC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2xzcC9pbnRlcm5hbC9lbmdpbmUvR3Jvb3Z5TGFuZ3VhZ2VFbmdpbmUuamF2YQ==)
 | 78.7037% | [9 Missing and 14 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...e/src/main/groovy/groovy/console/ui/Console.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-console%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fconsole%2Fui%2FConsole.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnNvbGUvc3JjL21haW4vZ3Jvb3Z5L2dyb292eS9jb25zb2xlL3VpL0NvbnNvbGUuZ3Jvb3Z5)
 | 0.0000% | [10 Missing :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...che/groovy/lsp/internal/LanguageServerContext.java](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-lsp%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Flsp%2Finternal%2FLanguageServerContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWxzcC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2xzcC9pbnRlcm5hbC9MYW5ndWFnZVNlcnZlckNvbnRleHQuamF2YQ==)
 | 87.5000% | [0 Missing and 2 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...main/groovy/org/apache/groovy/groovysh/Main.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-groovysh%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fgroovysh%2FMain.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyb292eXNoL3NyYy9tYWluL2dyb292eS9vcmcvYXBhY2hlL2dyb292eS9ncm9vdnlzaC9NYWluLmdyb292eQ==)
 | 85.7143% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/2976/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2976        +/-   ##
   ==================================================
   + Coverage     72.2619%   72.3054%   +0.0436%     
   - Complexity      40496      40683       +187     
   ==================================================
     Files            1643       1645         +2     
     Lines          142533     142945       +412     
     Branches        26764      26862        +98     
   ==================================================
   + Hits           102997     103357       +360     
   + Misses          30080      30077         -3     
   - Partials         9456       9511        +55     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2976?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../groovy/lsp/internal/compile/CompilerSettings.java](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-lsp%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Flsp%2Finternal%2Fcompile%2FCompilerSettings.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWxzcC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2xzcC9pbnRlcm5hbC9jb21waWxlL0NvbXBpbGVyU2V0dGluZ3MuamF2YQ==)
 | `92.9412% <100.0000%> (+0.2583%)` | :arrow_up: |
   | 
[...he/groovy/lsp/internal/compile/GroovyCompiler.java](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-lsp%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Flsp%2Finternal%2Fcompile%2FGroovyCompiler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWxzcC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2xzcC9pbnRlcm5hbC9jb21waWxlL0dyb292eUNvbXBpbGVyLmphdmE=)
 | `87.4396% <100.0000%> (+0.0610%)` | :arrow_up: |
   | 
[...main/groovy/org/apache/groovy/groovysh/Main.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-groovysh%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fgroovysh%2FMain.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyb292eXNoL3NyYy9tYWluL2dyb292eS9vcmcvYXBhY2hlL2dyb292eS9ncm9vdnlzaC9NYWluLmdyb292eQ==)
 | `76.0204% <85.7143%> (+0.3590%)` | :arrow_up: |
   | 
[...che/groovy/lsp/internal/LanguageServerContext.java](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-lsp%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Flsp%2Finternal%2FLanguageServerContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWxzcC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2xzcC9pbnRlcm5hbC9MYW5ndWFnZVNlcnZlckNvbnRleHQuamF2YQ==)
 | `94.3723% <87.5000%> (-0.5818%)` | :arrow_down: |
   | 
[...e/src/main/groovy/groovy/console/ui/Console.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-console%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fconsole%2Fui%2FConsole.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnNvbGUvc3JjL21haW4vZ3Jvb3Z5L2dyb292eS9jb25zb2xlL3VpL0NvbnNvbGUuZ3Jvb3Z5)
 | `0.0000% <0.0000%> (ø)` | |
   | 
[...y/groovysh/language/GroovyshLanguageSession.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-groovysh%2Fsrc%2Fmain%2Fgroovy%2Forg%2Fapache%2Fgroovy%2Fgroovysh%2Flanguage%2FGroovyshLanguageSession.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWdyb292eXNoL3NyYy9tYWluL2dyb292eS9vcmcvYXBhY2hlL2dyb292eS9ncm9vdnlzaC9sYW5ndWFnZS9Hcm9vdnlzaExhbmd1YWdlU2Vzc2lvbi5ncm9vdnk=)
 | `80.3419% <80.3419%> (ø)` | |
   | 
[...oovy/lsp/internal/engine/GroovyLanguageEngine.java](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-lsp%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Flsp%2Finternal%2Fengine%2FGroovyLanguageEngine.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWxzcC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2xzcC9pbnRlcm5hbC9lbmdpbmUvR3Jvb3Z5TGFuZ3VhZ2VFbmdpbmUuamF2YQ==)
 | `85.0000% <78.7037%> (-1.2745%)` | :arrow_down: |
   | 
[...ovy/console/ui/language/ConsoleLanguageHost.groovy](https://app.codecov.io/gh/apache/groovy/pull/2976?src=pr&el=tree&filepath=subprojects%2Fgroovy-console%2Fsrc%2Fmain%2Fgroovy%2Fgroovy%2Fconsole%2Fui%2Flanguage%2FConsoleLanguageHost.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnNvbGUvc3JjL21haW4vZ3Jvb3Z5L2dyb292eS9jb25zb2xlL3VpL2xhbmd1YWdlL0NvbnNvbGVMYW5ndWFnZUhvc3QuZ3Jvb3Z5)
 | `76.9231% <76.9231%> (ø)` | |
   
   ... and [12 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2976/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> Wire Groovy Console and groovysh to the in-process language engine
> ------------------------------------------------------------------
>
>                 Key: GROOVY-12448
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12448
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>
> h2. Context
> GROOVY-12411 added {{groovy-lsp}} and an in-process {{GroovyLanguageEngine}}. 
> That work left Groovy Console and groovysh unconnected. This change attaches 
> those two hosts to the same engine so an unsaved buffer can be queried for 
> diagnostics, completion, hover, and signatures without generating class files.
> Scripts still run through {{GroovyShell}} in the console and {{GroovyEngine}} 
> in groovysh.
> h2. User-visible behavior
> * *Groovy Console.* The editor compiles the unsaved buffer in the background 
> and highlights compiler diagnostics. {{Ctrl+Space}} offers compiler-backed 
> completions. Adding a jar or directory to the classpath is picked up on the 
> next compile.
> * *groovysh.* Tab completion and tail-tip descriptions consult the compiler 
> for the current buffer (imports, types, methods, and binding variables). 
> Syntax tail-tips report diagnostics and do not evaluate the line. {{/grab}} 
> remains the way to add Maven artifacts; the next completion or tail-tip 
> notices the loader change.
> h2. Design
> * {{groovy-console}} and {{groovy-groovysh}} take an {{implementation}} 
> dependency on {{groovy-lsp}}.
> * Adapters stay in the host trees: {{ConsoleLanguageHost}} (buffer URI 
> {{groovy-buffer:console}}) and {{GroovyshLanguageSession}} (buffer URI 
> {{groovy-buffer:repl}}). The engine does not assign those names. Both 
> adapters are {{{}@Internal{}}} and are not an embedding API.
> * Queries return JDK records. Host source does not import LSP4J. Feature 
> services inside {{groovy-lsp}} still use LSP4J types, so LSP4J remains a 
> runtime dependency of these hosts.
> * Positions are 0-based UTF-16.
> * The compile fingerprint includes {{URLClassLoader}} URLs, so an in-place 
> {{addURL}} (console classpath menu, groovysh {{/grab}}) is visible on the 
> next compile.
> * groovysh composes {{GroovyEngine.getBuffer()}}, declaration-only binding 
> types for names the buffer does not already introduce, and the current line. 
> Those names come from the compiled AST 
> ({{GroovyLanguageEngine.declaredNames}}).
> * groovysh {{SYNTAX}} tail-tips return compiler diagnostics and do not fall 
> through to Inspector {{checkSyntax}}, which evaluates. {{METHOD}} signatures 
> use the full {{CmdLine.line}} so an unclosed opening parenthesis is visible. 
> Inspector is used only when the compiler has no signatures.
> h2. Out of scope
> * Replacing SmartDocumentFilter or the nanorc highlighter with semantic 
> tokens.
> * Driving AstBrowser from an LSP snapshot.
> * A public embedding API for the adapters.
> * Splitting a protocol-free engine module out of {{groovy-lsp}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to