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

breaking change: Change "type" to be a keyword, import() "type:" parameter to "format:" #4517

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Nov 19, 2024

Resolves #4486.

type is now reserved and cannot be used for variable names, function names, or object member names.

For import(), the type option was renamed to format. For example, code like this:

model = import("tests/inputs/cube.obj", {type: "obj"})

needs to change to:

model = import("tests/inputs/cube.obj", {format: "obj"})

I verified that kcl-samples doesn't need any updates.

Copy link

qa-wolf bot commented Nov 19, 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 Nov 19, 2024

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Nov 20, 2024 2:24pm

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.05%. Comparing base (d8ce5ad) to head (4f78e2d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4517   +/-   ##
=======================================
  Coverage   86.05%   86.05%           
=======================================
  Files          80       80           
  Lines       29538    29538           
=======================================
  Hits        25418    25418           
  Misses       4120     4120           
Flag Coverage Δ
wasm-lib 86.05% <100.00%> (ø)

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.


🚨 Try these New Features:

@jtran jtran changed the title Add "type" to list of reserved keywords breaking change: Add "type" to list of reserved keywords Nov 19, 2024
@jtran jtran marked this pull request as ready for review November 19, 2024 20:48
@jtran jtran changed the title breaking change: Add "type" to list of reserved keywords breaking change: Change "type" to be a keyword, import() "type:" parameter -> "format:" Nov 20, 2024
@jtran jtran changed the title breaking change: Change "type" to be a keyword, import() "type:" parameter -> "format:" breaking change: Change "type" to be a keyword, import() "type:" parameter to "format:" Nov 20, 2024
@jtran jtran enabled auto-merge (squash) November 20, 2024 14:47
@jtran jtran merged commit a2f9e70 into main Nov 20, 2024
33 checks passed
@jtran jtran deleted the jtran/import-type branch November 20, 2024 14:53
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.

Reserve more keywords in KCL
2 participants