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

Basic support for browsing a specific version of a crate #24

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

mystor
Copy link
Contributor

@mystor mystor commented Sep 18, 2024

This adds a couple of new path endpoints which can be used to browse the
contents of a specific version of a crate. this is implemented under the hood
as a diff between a crate/version and itself.

When viewing one of these self-diffs, the folding logic is also modified to
default to not folding unchanged hunks, as needing to expand every file while
browsing is inconvenient.

The previously pinned version of the time crate in Cargo.lock causes build
errors in rustc 1.80.0. Bump to the next version to avoid the build failure.
this adds a couple of new path endpoints which can be used to browse the
contents of a specific version of a crate. this is implemented under the hood
as a diff between a crate/version and itself.

When viewing one of these self-diffs, the folding logic is also modified to
default to not folding unchanged hunks, as needing to expand every file while
browsing is inconvenient.
mystor added a commit to mystor/cargo-vet that referenced this pull request Sep 18, 2024
This change adds support to remember user's --mode choices, so that they
do not need to be used every time. In addition, it adds a basic support
for diff.rs to inspect (by loading a diff from a version to itself) such
that this mode memory can be shared between diff and inspect.

If xfbs/diff.rs#24 is merged, we should change the diff.rs inspect
behaviour to use the new browse endpoints instead.

Finally, this patch changes the default mode from sourcegraph to
diff.rs. As noted in mozilla#611, sourcegraph has been quite unreliable lately,
and diff.rs is likely to provide a better experience until that is
resolved.
@xfbs xfbs merged commit e8cd20f into xfbs:master Sep 19, 2024
@xfbs
Copy link
Owner

xfbs commented Sep 19, 2024

LGTM, thanks!

mystor added a commit to mystor/cargo-vet that referenced this pull request Sep 19, 2024
This was a new endpoint added in xfbs/diff.rs#24, which is used to
browse a specific version of a crate.
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