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

Fix workspace with default root, simplify lots walkers & metadata #532

Merged
merged 40 commits into from
Aug 8, 2024

Conversation

max-sixty
Copy link
Sponsor Collaborator

@max-sixty max-sixty commented Jul 22, 2024

On top of #531; that needs to merge first. This simplifies that code

OK so:

  • this PR brings together a big bug fix and few refactors, since they were stepping on each other
  • it builds on top of some tests that a) demonstrate mostly correct behavior and b) show the bug — a panic when running cargo test --accept --workspace on a workspace with a default crate and other members. It fixes that bug, and removes the #[should_panic] attribute on that test. None of the previously correct behavior changes.
  • It simplifies the walkers a lot
  • It simplifies the metadata collection a lot

I realize it was a bit messy to get here. Hopefully now that we have tests, it's easier to review small changes to code, and we don't have quite so many slightly-overlapping changes pending at the same time. I do think some of the code was getting needlessly complicated and this makes it much simpler, as well as fixing the bug. (But ofc very open to suggested changes!)

max-sixty added a commit to max-sixty/insta that referenced this pull request Jul 28, 2024
It was previously a bit disparate and difficult to verify. This simplifies & unifies the code.

It builds on mitsuhiko#532, so that should merge first.
max-sixty added a commit to max-sixty/insta that referenced this pull request Aug 2, 2024
This splits out the changes in the test code from mitsuhiko#532 in order to make that diff smaller.

It divides  the building of the test case files from the test case files on disk + running the test, which make the structs simpler & more obvious
max-sixty added a commit that referenced this pull request Aug 2, 2024
This splits out the changes in the test code from #532 in order to make that diff smaller.

It divides  the building of the test case files from the test case files on disk + running the test, which make the structs simpler & more obvious
This adds the tests from mitsuhiko#532 into the repo so we can compare the changes between existing `master` and the new code. One test panics, which is tagged here (and we wil remove in mitsuhiko#532)
max-sixty added a commit that referenced this pull request Aug 2, 2024
This adds the tests from #532 into the repo so we can compare the changes between existing `master` and the new code. One test panics, which is tagged here (and we wil remove in #532)
@max-sixty max-sixty changed the title Unify snapshot walkers Fix workspace with default root, simplify lots walkers & metadata Aug 2, 2024
@max-sixty
Copy link
Sponsor Collaborator Author

@mitsuhiko if you're happy with this, I think we could merge and then release 1.40...

(maybe also #482 if you're happy with it, but less immediacy...)

@mitsuhiko mitsuhiko merged commit d88ca89 into mitsuhiko:master Aug 8, 2024
15 checks passed
@mitsuhiko
Copy link
Owner

Looks good!

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