Skip to content

Conversation

mlechu
Copy link
Member

@mlechu mlechu commented Jul 1, 2025

Two small and related changes:

  1. The node->expr conversion shouldn't peek at provenance from SyntaxNode or SyntaxTree, so fix the couple of places we do this. We've always had provenance available, but we won't once there are nodes constructed from exprs for compatibility.

  2. JuliaLowering currently relies on putting its own data structures through the JuliaSyntax node->expr machine. Remove a couple of type annotations and reinstate _expr_leaf_val so that this is possible.

This change should make JuliaSyntax compatible with JuliaLowering again after #560, though some tweaks need to be done on JuliaLowering's end before JETLS can bump deps (cc @aviatesk)

@mlechu mlechu requested a review from Keno July 1, 2025 20:18
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.11%. Comparing base (71320ea) to head (a55ac20).

❗ There is a different number of reports uploaded between BASE (71320ea) and HEAD (a55ac20). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (71320ea) HEAD (a55ac20)
3 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #569      +/-   ##
==========================================
- Coverage   95.56%   88.11%   -7.45%     
==========================================
  Files          15       15              
  Lines        4441     3265    -1176     
==========================================
- Hits         4244     2877    -1367     
- Misses        197      388     +191     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mlechu added 2 commits July 1, 2025 17:55
Two small and related changes:

1. The node->expr conversion shouldn't peek at provenance from SyntaxNode or
     SyntaxTree, so fix the couple of places we do this.  We've always had
     provenance available, but we won't once there are nodes constructed from
     exprs for compatibility.

2. JuliaLowering currently relies on putting its own data structures through the
    JuliaSyntax node->expr machine.  Remove a couple of type annotations and
    reinstate `_expr_leaf_val` so that this is possible.
A JuliaLowering.SyntaxTree may have a line number node instead of a SourceFile
     as its location.  Pushing the linenode through `node_to_expr` is strange
     and temporary, according to comments.
@mlechu mlechu merged commit c029996 into JuliaLang:main Jul 2, 2025
35 checks passed
c42f pushed a commit to JuliaLang/julia that referenced this pull request Oct 17, 2025
…#569)

* Tweaks to expr-conversion for JuliaLowering

Two small and related changes:

1. The node->expr conversion shouldn't peek at provenance from SyntaxNode or
     SyntaxTree, so fix the couple of places we do this.  We've always had
     provenance available, but we won't once there are nodes constructed from
     exprs for compatibility.

2. JuliaLowering currently relies on putting its own data structures through the
    JuliaSyntax node->expr machine.  Remove a couple of type annotations and
    reinstate `_expr_leaf_val` so that this is possible.

* Remove source's type annotation too

A JuliaLowering.SyntaxTree may have a line number node instead of a SourceFile
     as its location.  Pushing the linenode through `node_to_expr` is strange
     and temporary, according to comments.
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