Skip to content

Keep up with breaking JuliaSyntax changes#9

Merged
davidanthoff merged 1 commit into
mainfrom
keep-up-with-js
Mar 23, 2023
Merged

Keep up with breaking JuliaSyntax changes#9
davidanthoff merged 1 commit into
mainfrom
keep-up-with-js

Conversation

@davidanthoff

@davidanthoff davidanthoff commented Mar 23, 2023

Copy link
Copy Markdown
Member

@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 :)

@codecov

codecov Bot commented Mar 23, 2023

Copy link
Copy Markdown

Codecov Report

Merging #9 (a7d35a0) into main (bcc6a55) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage   74.35%   74.35%           
=======================================
  Files           8        8           
  Lines         776      776           
=======================================
  Hits          577      577           
  Misses        199      199           
Flag Coverage Δ
unittests 74.35% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/semantic_pass_toml_files.jl 94.23% <ø> (ø)
src/JuliaWorkspaces.jl 92.89% <100.00%> (ø)
src/semantic_pass_tests.jl 91.82% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@davidanthoff
davidanthoff merged commit 9f8f4b9 into main Mar 23, 2023
@davidanthoff
davidanthoff deleted the keep-up-with-js branch March 23, 2023 03:41
@c42f

c42f commented Mar 23, 2023

Copy link
Copy Markdown

Thanks for the heads up.

This is because

There's some functions to access the tree:

  • children(node) instead of node.children (previously aliased with node.val)
  • haschildren(node) instead of length(node.children)>0
  • child(node, 1) or simply node[1], instead of node.children[1] (note, you can dig into the tree with child(node, 1, 2) instead of node[1][2])
  • node.val should be ok to use I guess.

@davidanthoff

Copy link
Copy Markdown
Member Author

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.

@c42f

c42f commented Mar 23, 2023

Copy link
Copy Markdown

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)

JuliaLang/Juleps#54

pfitzseb added a commit that referenced this pull request Jul 19, 2026
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>
pfitzseb added a commit that referenced this pull request Jul 19, 2026
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>
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.

2 participants