Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor source ranges into a generic node type #4350

Merged
merged 29 commits into from
Oct 30, 2024

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Oct 29, 2024

Replaces #4281. This is a step towards #4240.

This factors source ranges out of AST types and into a single Node<T> type. Using serde-flatten, the JSON representation and corresponding parsed JS object stay the same. This should make it much easier to add or change fields that are common to all AST nodes.

Copy link

qa-wolf bot commented Oct 29, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Oct 30, 2024 7:39pm

Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 90.74853% with 110 lines in your changes missing coverage. Please review.

Project coverage is 86.07%. Comparing base (0d52851) to head (dc2ede9).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/ast/types.rs 77.64% 93 Missing ⚠️
src/wasm-lib/kcl/src/executor.rs 78.57% 6 Missing ⚠️
src/wasm-lib/kcl/src/ast/types/condition.rs 0.00% 5 Missing ⚠️
src/wasm-lib/kcl/src/walk/ast_node.rs 87.50% 3 Missing ⚠️
src/wasm-lib/kcl/src/parser/parser_impl.rs 99.82% 1 Missing ⚠️
src/wasm-lib/kcl/src/std/kcl_stdlib.rs 0.00% 1 Missing ⚠️
src/wasm-lib/kcl/src/walk/ast_walk.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4350      +/-   ##
==========================================
+ Coverage   85.86%   86.07%   +0.21%     
==========================================
  Files          77       78       +1     
  Lines       27434    27621     +187     
==========================================
+ Hits        23557    23776     +219     
+ Misses       3877     3845      -32     
Flag Coverage Δ
wasm-lib 86.07% <90.74%> (+0.21%) ⬆️

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

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

@jtran jtran marked this pull request as ready for review October 30, 2024 01:51
@jtran jtran requested a review from Irev-Dev October 30, 2024 02:27
Copy link
Collaborator

@adamchalmers adamchalmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, great job, this is a huge refactor, but it's worth it. Thanks so much!

@jtran jtran enabled auto-merge (squash) October 30, 2024 20:09
@jtran
Copy link
Collaborator Author

jtran commented Oct 30, 2024

It was a team effort, for sure!

@jtran jtran merged commit 43bec11 into main Oct 30, 2024
32 checks passed
@jtran jtran deleted the jtran/nrc-refactor-node-rebased branch October 30, 2024 20:52
@franknoirot franknoirot mentioned this pull request Nov 7, 2024
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.

4 participants