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

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

testlens-app[bot] commented on PR #2936:
URL: https://github.com/apache/groovy/pull/2936#issuecomment-5684694098

   ## 🚨 TestLens detected 1 failed test 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them 
below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Failed Jobs without Test Failures
   
   ❌ [Lint gate / 
lint](https://github.com/apache/groovy/actions/runs/34997978134/job/104478947445?pr=2936)
   
   ### Test Summary
   
   #### [Build and test / lts \(17, windows-latest, 
1\)](https://github.com/apache/groovy/actions/runs/34997978162/job/104478948357?pr=2936)
 > :groovy-lsp:test
   
   | Test | Runs | Flakiness |
   |---|---|--:|
   | ExecutionCoverageTest > configurationAndFolderChangesUpdateSettings\(\) | 
❌ | 0% 🟢 |
   
   🏷️ Commit: 8621d6a4f008c4b921a974383708dc4529ecd3cd
   ▶️ Tests:  60533 executed
   🟡 Checks: 9/30 completed
   
   ### Test Failures
   
   <details><summary><strong>ExecutionCoverageTest > 
configurationAndFolderChangesUpdateSettings()</strong> (:groovy-lsp:test in <a 
href="https://github.com/apache/groovy/actions/runs/34997978162/job/104478948357?pr=2936";>Build
 and test / lts (17, windows-latest, 1)</a>)</summary>
   
   ```
   Assertion failed: 
   
   assert fixture.server.context.workspaceFolders.contains(folder.toUri())
          |       |      |       |                |        |      |
          |       |      |       |                false    |      
file:///C:/Users/RUNNER~1/AppData/Local/Temp/groovy-lsp-folder16524323883363147245/
          |       |      |       |                         
C:\Users\RUNNER~1\AppData\Local\Temp\groovy-lsp-folder16524323883363147245
          |       |      |       
[file:///c:/Users/RUNNER~1/AppData/Local/Temp/groovy-lsp-folder16524323883363147245/]
          |       |      
org.apache.groovy.lsp.internal.LanguageServerContext@c0c8f96
          |       org.apache.groovy.lsp.GroovyLanguageServer@3bd08435
          org.apache.groovy.lsp.internal.LspFixture@3e52ed5d
   
        at 
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:409)
        at 
org.apache.groovy.lsp.internal.ExecutionCoverageTest.configurationAndFolderChangesUpdateSettings(ExecutionCoverageTest.groovy:276)
   ```
   
   </details>
   
   ### Rerun Controls
   > [!NOTE]
   > Checks are currently running using the configuration below.
   
   Select tests to mute in this pull request:
   
   🔲 ExecutionCoverageTest > configurationAndFolderChangesUpdateSettings\(\) <!

> Add a first-party Language Server Protocol implementation (groovy-lsp)
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-12411
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12411
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>
> Ship an optional first-party language server so editors and AI tools can 
> offer Groovy completion, navigation, diagnostics, and conservative rename 
> against the in-tree compiler.
> h3. Why
> Community servers lag language changes because they compile with a snapshot 
> of Groovy, not the tree this repository ships. {{groovy-lsp}} uses the same 
> {{CompilationUnit}} as the rest of Groovy, so parser and type-system work 
> land in editors automatically. It is a Groovy *language core* for LSP, not a 
> workspace or IDE: the differentiator is the same compiler, a small surface, 
> and edits that refuse to guess, not more IDE features.
> h3. Intended use and vision
> * Direct use in an IDE or editor: start {{groovylsp}} and speak stdio 
> JSON-RPC. The client supplies {{classpath}} / {{sourcePaths}}.
> * The same process is the semantic backend for Groovy-aware AI. A later 
> {{groovy-mcp}} module is expected to wrap it so a model can ask what an 
> identifier is without embedding the compiler.
> * Other Apache-2.0 Groovy language servers (and {{groovy-mcp}}) may extend 
> the compile and protocol loop through the incubating {{GroovyLspExtension}} 
> SPI instead of forking it. Eclipse JDT / groovy-eclipse servers remain a 
> parallel stack; they cannot replace this compiler through the SPI.
> h3. What this is not
> Out of scope on purpose (these are strengths of other implementations):
> * Joint Groovy+Java compilation and cross-language rename
> * GDSL / Jenkins pipeline descriptors (a plugin may add them; this module 
> does not load GDSL itself)
> * Invoking Gradle or Maven (no Tooling API)
> * Debugger (DAP) and test runner
> * Identifier-text "rename every {{foo}} in the file" fallbacks
> * Extra name-span fields on {{AnnotatedNode}}: identifier selection lives in 
> groovy-lsp ({{Positions.toNameRange}})
> h3. Relation to other Groovy language servers
> * Prominic {{groovy-language-server}}: earlier community server; this module 
> is a new implementation, not a fork.
> * {{trustytrojan/groovyls}} (Apache 2.0): Jenkins GDSL and a forced 
> static-type-checking pass. Natural SPI consumer; those features stay out of 
> this module.
> * {{tomaszrup/groovy-language-server-edt}} (EPL 2.0, JDT + groovy-eclipse): 
> complementary product for joint compilation and Java interop. None of its 
> source is copied. Its identifier-scan rename fallback is not used.
> h3. Positions (not an LSP break)
> GROOVY-12085 made *compiler* AST columns 1-based Unicode code points. That is 
> not an LSP coordinate change. Protocol positions stay 0-based in the encoding 
> negotiated at {{initialize}} ({{utf-16}} by default). The server converts; 
> clients never see AST columns. Existing LSP clients do not need to change how 
> they send positions.
> h3. Rename and dynamically typed Groovy
> {{MethodCallExpression.methodTarget}} is often empty in dynamic Groovy. A 
> name-and-arity match is a heuristic: good enough for hover, not for rewriting 
> source.
> ||Feature||When {{methodTarget}} is set||When it is not (typical dynamic 
> Groovy)||
> |Hover|Bound signature|Unique arity match on a resolved receiver, labelled 
> {{inferred}}; otherwise {{name(...)}}|
> |Definition|That method|Every arity-matching candidate with a source 
> location; never a random first match|
> |Rename / prepareRename|Allowed|Refused. A heuristic must not rewrite the 
> wrong overload.|
> Declarations (class, method, field, parameter, bound local) rename by 
> identity (owner + name + descriptor), not the unqualified identifier. Class 
> rename also renames the file when the class name matches the file stem.
> h3. What to ship
> * New optional subproject {{groovy-lsp}} (not part of {{groovy-all}})
> * {{groovylsp}} / {{groovylsp.bat}} launchers (stdio JSON-RPC; optional 
> {{\-\-socket}})
> * LSP 3.18 over Eclipse LSP4J 1.0; unknown 3.19 fields ignored; advertise 
> only implemented capabilities
> * Compile open buffers through {{SEMANTIC_ANALYSIS}} (no class generation)
> * Identifier selection in groovy-lsp from the node's existing source span (no 
> extra {{AnnotatedNode}} fields)
> * Incubating {{GroovyLspExtension}} SPI ({{ServiceLoader}} / 
> {{ExtensionHost}})
> h3. Language features
> * Incremental sync, push/pull diagnostics
> * Completion (keywords, snippets, members, workspace types with auto-import, 
> GDK with a prefix) and {{completionItem/resolve}}
> * Hover, signature help, document highlight
> * Definition, type definition, implementation, declaration, references (by 
> declaration identity)
> * Prepare-rename / rename as in the table above
> * Document and workspace symbols, folding, selection range, semantic tokens, 
> inlay hints
> * Organize imports (star, static, alias); unused-import hints
> * Code actions: add import, implement abstracts, insert inferred field type, 
> add package from path, create missing class stub, generate accessors / 
> {{toString}} / {{equals}}/{{hashCode}} / constructor, add {{@Override}}
> * Call hierarchy and type hierarchy
> * Reference-count code lenses
> h3. Safety and classpath
> * {{@Grab}} and {{@ASTTest}} off unless the client sets {{grapeEnabled}} / 
> {{astTestEnabled}}
> * Diagnostics scoped to the owning source unit (shared {{ErrorCollector}})
> * No Gradle or Maven Tooling API; the client supplies {{classpath}} / 
> {{sourcePaths}}. If those are empty, fall back to {{src/main/groovy}} (and 
> friends) and jars under {{lib}} / {{libs}} (paths stored with {{/}} 
> separators)
> * Unchanged inputs skip recompilation; {{GroovyClassLoader}} is reused and 
> closed on shutdown
> * A throwing plugin must not abort compile or a request
> h3. How to run
> {code}
> groovylsp
> {code}
> Optional flags: {{\-\-stdio}} (default), {{\-\-socket port}}, {{\-\-help}}, 
> {{\-\-version}}.



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

Reply via email to