Skip to content

Warnings and warn on angle defaults #7502

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

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

Warnings and warn on angle defaults #7502

wants to merge 7 commits into from

Conversation

nrc
Copy link
Contributor

@nrc nrc commented Jun 17, 2025

This is two PRs in one, sorry!

Part one allows to allow/deny warnings using an attribute. There's a few follow-ups required for this. I'll file some issues soon. In particular, this only applies to warnings generated during execution, not parsing.

Part two adds a new warning for using numbers as angles without an explicit suffix (e.g., using 90 instead of 90deg). The intention with this is to make it less common to hit units issues with PI by discouraging AI and users from using math to convert between degrees and radians (and use implicit or explicit conversion instead). Long-term, I hope to make this a hard error in order to improve our units system, but since that is a breaking change, we'll need this warning for a long while first.

As part of this change I have modified the frontend to always use suffixes with angles. However, I am very unsure that I have done this very well or completely, so please give a close review to the frontend parts.

Copy link

vercel bot commented Jun 17, 2025

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

Name Status Preview Comments Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 2:04am

Copy link

codspeed-hq bot commented Jun 17, 2025

CodSpeed Instrumentation Performance Report

Merging #7502 will not alter performance

Comparing nrc-warn-attr (14e3311) with main (6358eed)

Summary

✅ 85 untouched benchmarks

nrc added 5 commits June 19, 2025 11:12
Signed-off-by: Nick Cameron <[email protected]>
Signed-off-by: Nick Cameron <[email protected]>
Signed-off-by: Nick Cameron <[email protected]>
Signed-off-by: Nick Cameron <[email protected]>
@nrc nrc requested review from a team as code owners June 19, 2025 01:24
@nrc nrc requested review from Irev-Dev and jtran June 19, 2025 01:25
Signed-off-by: Nick Cameron <[email protected]>
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