Old pony 5300#169
Merged
IgorDeepakM merged 5 commits intomasterfrom May 4, 2026
Merged
Conversation
Implements the three call hierarchy operations in pony-lsp: - textDocument/prepareCallHierarchy - callHierarchy/incomingCalls - callHierarchy/outgoingCalls
- Expand single-line `if ... then ... end` guards to multi-line form - Expand inline `try ... else ... end` expressions to multi-line form - Remove trailing blank line in selection_ranges.pony - Tighten multi-line string concatenations in workspace_manager.pony that were split at the `+` operator
…#5299)
Each AST test called FilePath.mkdtemp("pony-lint-ast-test") and never
removed the directory. Over local development the cwd accumulated
hundreds of these dirs (1200+ / 9.4MB reported on the issue).
Wrap the compile match in a try/else so tmp.remove() runs on every
exit -- success and error paths -- before the function returns.
SourceFile holds the source content in-memory after construction
(tools/pony-lint/source_file.pony), so removing the underlying tmpdir
after compile() does not affect the returned (program, sf) pair.
Update the docstring -- "the directory persists" no longer holds.
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
- Fix supertype dedup: replace Set[USize]/digestof with Set[AST val] so deduplication uses raw pointer identity via AST.hash()/eq(), matching the invariant stated in the comment - Add name prefilter to _SubtypeCollector to skip the expensive definitions() call when no nominal in the provides clause matches the target entity name, mirroring _IncomingCallCollector in call_hierarchy - Add _find_entity_node helper to WorkspaceManager, paralleling _find_method_node: negative-coord guard + entity resolution at the workspace boundary; use it in type_hierarchy_supertypes/subtypes - Delegate _is_entity to TokenIds.is_entity, excluding tk_object, so new compiler entity tokens are picked up automatically - Annotate _provides_defs return type as Array[AST val] - Correct stale function name in isectype test docstring - Correct misleading comment about tk_uniontype in _append_provides_defs * Extend type hierarchy integration tests Add subtypes_isect test exercising the tk_isecttype recursion path in _provides_mentions from the subtypes direction. Add supertypes_dedupe test with a diamond-provides fixture to make the Set[AST val] dedup in _collect_supertypes counterfactually testable. Clarify the conservative fallback comment in _provides_mentions.
A followup to #5299. Use `h.assert_true(tmp.remove(), ...)` so that silent removal failures surface as test failures rather than going undetected. Update the docstring to accurately describe cleanup on both return and error paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.