Skip to content

Make 'npm run test:rust' work out-of-the-box #6721

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

Merged
merged 3 commits into from
May 7, 2025
Merged

Conversation

jacebrowning
Copy link
Contributor

@jacebrowning jacebrowning commented May 6, 2025

just test should, well, just work by installing our chosen test runner automatically.

I also removed a section of CONTRIBUTING.md that was already stale and I plan to revisit.

Contributes to #4012

@jacebrowning jacebrowning self-assigned this May 6, 2025
Copy link

qa-wolf bot commented May 6, 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

vercel bot commented May 6, 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 May 7, 2025 3:26pm

@jacebrowning jacebrowning marked this pull request as ready for review May 7, 2025 14:31
@jacebrowning jacebrowning requested a review from jtran May 7, 2025 14:32

RUST_BACKTRACE="full"
PYO3_PYTHON=/usr/local/bin/python3
#KITTYCAD_API_TOKEN="required token from dev.zoo.dev for engine testing"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the Rust tools read this file?

Copy link
Contributor

Choose a reason for hiding this comment

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

What I'm trying to say is, I don't think any of the Rust tools read this file or the .local one. So by removing RUST_BACKTRACE="full" from the justfile and adding it here, I don't think the functionality is preserved. I don't personally use just test, so it doesn't really bother me. I'm going to use my own environment variables anyway. (I've been using direnv for times when I don't control the invocation.) But maybe you want to know.

Copy link
Contributor Author

@jacebrowning jacebrowning May 7, 2025

Choose a reason for hiding this comment

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

They don't explicitly need this file. This is merely a convenient way of enumerating all environment variables with defaults and a way to override them.

#VITE_KC_DEV_TOKEN="your token from dev.zoo.dev should go in .env.development.local"
#VITE_KC_DEV_TOKEN="optional token from dev.zoo.dev to skip auth in the app"

RUST_BACKTRACE=1
Copy link
Contributor

Choose a reason for hiding this comment

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

I actually couldn't find docs on it, but it's essentially verbosity level. If you hit a Rust panic without it set, the CLI error message literally tells you to set it to full.

rust-lang/cargo#1634 (comment)

@jacebrowning jacebrowning merged commit f8a33a6 into main May 7, 2025
48 checks passed
@jacebrowning jacebrowning deleted the fix-rust-test branch May 7, 2025 15:35
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