Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ moving on. Fix any type errors or missing imports immediately.
| Plugin not active | Run `claude plugin list` to verify, then `/reload-plugins` |
| Diagnostics slow on first open | Normal — tree-sitter parses on first load, then incremental |
| Java errors show up one tool call after the edit | Claude Code doesn't wait for LSP diagnostics after Edit/Write ([anthropics/claude-code#93321](https://github.com/anthropics/claude-code/issues/93321)). The plugin's hook waits up to 3s for them; if jdtls is slower (large projects), raise `JAVA_FUNCTIONAL_LSP_HOOK_WAIT` (max 4). See [Fresh jdtls diagnostics after edits](#fresh-jdtls-diagnostics-after-edits) |
| False "X cannot be resolved" / "The hierarchy of the type X is inconsistent" on classes from another Maven group of the same repository | jdtls imports only the opened file's Maven group, so a sibling module from another group must come from the local Maven repository; if it was never installed at the reactor's version, its types are missing. Check the server's log (stderr, as captured by your LSP client) for `jdtls: pom.xml errors changed for <module>/pom.xml: ... Missing artifact g:a:jar:v`, `jdtls[log:1]: ...` and `jdtls[status:Error]: ...` lines, and `jdtls: group scope: ...` for which folder was imported. Workaround: `mvn install` the missing modules. Automatic import of in-repo dependencies is tracked in [#110](https://github.com/aviadshiber/java-functional-lsp/issues/110) |

### Other Editors

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "java-functional-lsp"
version = "0.13.0"
version = "0.13.1"
description = "Java LSP server enforcing functional programming best practices — null safety, immutability, no exceptions"
readme = "README.md"
license = { text = "MIT" }
Expand Down Expand Up @@ -85,6 +85,7 @@ ignore = ["PLR0913", "PLC0415", "PLW0603", "PLW0602"]
"**/test_*.py" = ["PLR2004"]
"**/cli.py" = ["T20", "PLR0912", "PLR2004"]
"**/fixes.py" = ["PLR0911", "PLR0912"]
"scripts/*.py" = ["T20", "PLR2004"]

[tool.ruff.format]
quote-style = "double"
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-formula.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

Usage: python3 scripts/generate-formula.py <version>
"""

from __future__ import annotations

import json
Expand Down
2 changes: 1 addition & 1 deletion src/java_functional_lsp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""java-functional-lsp: A Java LSP server enforcing functional programming best practices."""

__version__ = "0.13.0"
__version__ = "0.13.1"
261 changes: 252 additions & 9 deletions src/java_functional_lsp/proxy.py

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,10 @@ class TestLazyStart:
@pytest.fixture(autouse=True)
def _clear_group_root_cache(self) -> None: # type: ignore[override]
"""Clear _find_maven_group_root lru_cache between tests."""
from java_functional_lsp.proxy import _find_maven_group_root
from java_functional_lsp.proxy import _find_maven_group_root, _find_repo_boundary

_find_maven_group_root.cache_clear()
_find_repo_boundary.cache_clear()

def test_check_available_true(self) -> None:
from java_functional_lsp.proxy import JdtlsProxy
Expand Down Expand Up @@ -1204,6 +1205,7 @@ async def test_expand_full_workspace_removes_initial_module(self, tmp_path: Path
for d in (module_a, module_b):
d.mkdir(parents=True)
(group / "pom.xml").write_text("<project><modules><module>module-a</module></modules></project>")
(monorepo / ".git").mkdir() # repository boundary: group sits below it, so it is a candidate

module_a_uri = module_a.as_uri()
module_b_uri = module_b.as_uri()
Expand Down Expand Up @@ -1270,6 +1272,7 @@ async def test_add_module_cross_group_expands_new_group(self, tmp_path: Path) ->
(d / "pom.xml").write_text("<project/>")
(group_a / "pom.xml").write_text("<project><modules><module>mod-a</module></modules></project>")
(group_b / "pom.xml").write_text("<project><modules><module>mod-b</module></modules></project>")
(monorepo / ".git").mkdir() # repository boundary: the groups sit below it

proxy = JdtlsProxy()
proxy._available = True
Expand Down Expand Up @@ -1310,6 +1313,7 @@ async def test_add_module_within_expanded_group_is_noop(self, tmp_path: Path) ->
(group / "pom.xml").write_text(
"<project><modules><module>mod-a</module><module>mod-b</module></modules></project>"
)
(monorepo / ".git").mkdir() # repository boundary: group sits below it

proxy = JdtlsProxy()
proxy._available = True
Expand Down
Loading
Loading