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

Support using import statements for non-KCL files #5122

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nrc
Copy link
Contributor

@nrc nrc commented Jan 21, 2025

This allows using import statements rather than the import std library command.

Outstanding work:

  • imports in the artifact graph and the timeline (I'm not sure how imports are/should be represented here, will do this as a follow-up unless the current approach (do nothing) breaks things)
  • units, coords, and explicit format (I plan to support these as attributes in a follow-up PR)
  • remove import function and make import a keyword (follow-up PR after some deprecation time)

@nrc nrc requested a review from jtran January 21, 2025 01:50
Copy link

vercel bot commented Jan 21, 2025

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jan 22, 2025 4:56am

Copy link

qa-wolf bot commented Jan 21, 2025

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

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 79.57746% with 87 lines in your changes missing coverage. Please review.

Project coverage is 86.12%. Comparing base (67cc4f5) to head (02450d0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/execution/import.rs 72.54% 56 Missing ⚠️
src/wasm-lib/kcl/src/parsing/parser.rs 81.44% 18 Missing ⚠️
src/wasm-lib/kcl/src/execution/mod.rs 91.95% 7 Missing ⚠️
src/wasm-lib/kcl/src/parsing/ast/types/mod.rs 64.70% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5122      +/-   ##
==========================================
- Coverage   86.15%   86.12%   -0.04%     
==========================================
  Files          89       90       +1     
  Lines       32450    32603     +153     
==========================================
+ Hits        27958    28079     +121     
- Misses       4492     4524      +32     
Flag Coverage Δ
wasm-lib 86.12% <79.57%> (-0.04%) ⬇️

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.

@nrc nrc force-pushed the nrc-import-foreign branch 2 times, most recently from a5ce445 to 6eca093 Compare January 21, 2025 19:34
@nrc nrc requested a review from adamchalmers January 21, 2025 19:38
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.

1 participant