Skip to content

Old pony 5278#167

Merged
IgorDeepakM merged 7 commits intomasterfrom
old_pony_5278
May 2, 2026
Merged

Old pony 5278#167
IgorDeepakM merged 7 commits intomasterfrom
old_pony_5278

Conversation

@IgorDeepakM
Copy link
Copy Markdown
Owner

No description provided.

orien and others added 7 commits May 2, 2026 11:20
…ves (#5278)

* Filter synthesized eq/ne from primitive document symbols

ponyc's add_comparable synthesizes eq and ne on every primitive using
the members node as the BUILD basis. BUILD-constructed subtrees inherit
every token's position from the basis, so both the TK_FUN keyword node
and the TK_ID name child share the same source position. User-written
members always place the keyword before the identifier.

Replace the broken data-pointer check (which also fired on all
user-written methods because tidy_up sets data = entity for every
locally-defined method) with this position-based filter: skip any
member whose keyword node position equals its name identifier position.

Also fix the test invocation which had an incorrect tuple wrapper around
_DocSymNoChildrenChecker.

* Add fixture and test for partial-synthesis case in document symbols

Adds _ds_compare_user_eq.pony: a primitive that defines eq explicitly,
leaving ponyc to synthesize only ne via add_comparable. Placed last in its
file so max_pos is None. The new test asserts exactly one child (eq, kind
method) — verifying the BUILD-position filter suppresses synthesized ne while
preserving the user-written eq.
Build pony-lint-ci once across the three lint-pony-* CI targets

Each of lint-pony-lint, lint-pony-doc, and lint-pony-lsp rebuilt
pony-lint-ci from Pony source before running, adding about two
minutes to every PR's Linux lint job. pony-lint-ci is now a real
file target with the lint tool sources as its prereqs, so the
second and third make invocations reuse the binary.

One catch for local development: edits under src/, packages/, or
the runtime no longer invalidate pony-lint-ci, so a contributor
iterating on the compiler will keep getting the previously built
binary until they `make clean` or delete it by hand. Documented
in BUILD.md.

Closes #5155
PR #5252 made $(outDir)/pony-lint-ci a real file target with order-only
`| all` so the lint binary is built once across the three lint-pony-*
CI targets. Order-only edges don't propagate mtime, so edits under
src/, packages/, or the runtime stopped invalidating the lint binary --
a contributor iterating on the compiler or stdlib and re-running `make
lint-pony-lint` would lint with the previously built binary.

Add regular prereqs for src/ C/C++/.ll/.d sources, packages/ Pony
sources, and an empty-recipe rule for $(outDir)/ponyc that catches
cross-invocation ponyc rebuilds. Each category covers a case the
others don't:

  - ponyc-bin-srcs: direct touches to src/ files within a single
    invocation (mtime-opaque order-only doesn't propagate ponyc's
    relink to pony-lint-ci).
  - stdlib-srcs: packages/ doesn't relink ponyc, so it has no other
    path to invalidation.
  - $(outDir)/ponyc: a prior `make build` (or `make libs && make
    build`) advanced ponyc's mtime; the next `make lint-pony-lint`
    sees it as newer than pony-lint-ci.

Drops the BUILD.md gotcha section that PR #5252 added to document the
broken behavior.
…ssue #5283) (#5293)

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
The four test-pony-* Makefile targets unconditionally rebuilt their
Pony test binaries on every invocation (~60s each). Convert each to
a file-target rule so rebuilds only happen when relevant sources
change, mirroring PR #5252 + #5284's pattern for pony-lint-ci.

Also drops the dead --path .../peg arg + obsolete TODO STA comment
from $(outDir)/pony-lsp-tests; the peg package was removed in
PR #5019 and ponyc had been silently tolerating the missing dir.

Closes #5281
Spelling errors and typos corrected in docstrings across the
backpressure, builtin, cli, collections, constrained_types, files,
net, pony_bench, pony_check, pony_test, process, promises, and random
packages, and the pony-lsp tool.

The fix in collections.Flags.le also corrects a stale cross-reference:
the docstring previously said "le is not the opposite of te," referring
to a function name that does not exist. It now correctly says "le is
not the opposite of gt," matching the parallel note on Flags.gt.
Add LSP type hierarchy support to pony-lsp

Implements the three LSP type hierarchy requests:
- textDocument/prepareTypeHierarchy: resolves the entity under the
  cursor and returns a TypeHierarchyItem (name, kind, uri, range,
  selectionRange)
- typeHierarchy/supertypes: walks the entity's provides list and
  returns items for each directly-referenced supertype, handling
  tk_provides and tk_isecttype wrapper nodes via recursive descent
- typeHierarchy/subtypes: cross-package visitor walk that finds every
  entity whose provides list directly includes the target entity

Includes six integration tests covering prepare on entity/non-entity,
supertypes with and without provides, and subtypes for a type with
and without subtypes.
@IgorDeepakM IgorDeepakM merged commit dd95dbd into master May 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants