Keep up with breaking JuliaSyntax changes#9
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9 +/- ##
=======================================
Coverage 74.35% 74.35%
=======================================
Files 8 8
Lines 776 776
=======================================
Hits 577 577
Misses 199 199
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Thanks for the heads up. This is because
There's some functions to access the tree:
|
|
Ah, excellent to know! #11 uses this better API. Also, major Julia gripe: that there is no way to actually really ever know what any given package considers internals that can break at any point and what the package considers its external/public API. Essentially the only tool we have is documentation, which is really not a good tool at all. I appreciate that we can always dig into everything, but at the same time it would be good to have something built into the language that allows a package author to make clear what is public/internal. |
|
Valid gripe! I actually started writing a julep on internal fields, but I'm not sure it was going in the right direction (and also it's hard to get any feedback on these kind of things) |
Plans lifting the per-file tree-visibility gate so method-set lints treat project functions like store functions. Splits into arg-count parity (always on, inventory-only, no sibling-analysis deps) and positional-type parity, and works through the feasibility of doing type checks only on file save (a cycle-free, save-gated cross-file query) — confirming the LS already has the didSave + diagnostic-refresh machinery for it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A module-level project function's method set spans files, so per-file mode declined the method-call lint for it entirely — a wrong-arity call to your own function got no diagnostic. Check the argument count against the FULL cross-file method set instead. Method arities `(minargs, maxargs, kws, kwsplat)` are extracted per file from the CST into the inventory (a new `MethodArity` struct — plain data, so it backdates; defined in the parent and imported into StaticLint, mirroring `ItemRef`) and aggregated across the tree by `derived_method_arities` — no dependency on any sibling's analysis, preserving incrementality. `check_call` uses it (via a `tree_arities` closure) for a tree-visible workspace callee — a local `Binding` or a sibling-only `TreeRef` — and reports the mismatch with the #8 detail. Bare forward declarations (`function f end`) contribute no arity, so they never false-flag. Positional-type parity across files is deferred (see the design doc). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@c42f some patch release after 0.3.0 for JuliaSyntax must have been breaking, without the changes in this PR here things that worked with 0.3.0 are no longer working with 0.3.3. I think I hopefully have caught up now with these changes, but just thought I'd let you know, it should probably have been a minor release somewhere in there :)