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

Consolidate onto INSTA_WORKSPACE_ROOT #614

Merged
merged 16 commits into from
Sep 27, 2024

Conversation

max-sixty
Copy link
Collaborator

@max-sixty max-sixty commented Sep 25, 2024

Intended to fix #575. Though after some iterations, it ends up being a code-clean-up. I'm not sure how CARGO_MANIFEST_DIR is leaking through — it's only referenced by env! rather than env::var, so should only matter at compile time.

Added a pretty thorough integration test (albeit maybe a bit too complicated)

Now a single place where `INSTA_WORKSPACE_ROOT` & `CARGO_MANIFEST_DIR` are checked, with priority to the former.

Fixes mitsuhiko#575

Could do with an integration test
@max-sixty max-sixty marked this pull request as ready for review September 26, 2024 17:56
@max-sixty
Copy link
Collaborator Author

max-sixty commented Sep 27, 2024

I'll merge now since it's just a refactor and there's a fairly complete test.

This closes #575 insofar as I can't see how that issue exists in the proposed code. But I also can't see how it existed in the recent code, so I'm not confident it's fixed. If there's a reproducible failure, happy to get it working.

@max-sixty max-sixty merged commit 3df8685 into mitsuhiko:master Sep 27, 2024
15 checks passed
@max-sixty max-sixty deleted the insta-workspace-root branch September 27, 2024 08:39
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.

INSTA_WORKSPACE_ROOT should also work with assert_snapshot! at runtime, for manual test binaries
1 participant