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

Revset: allow returning errors during iteration #4626

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

torquestomp
Copy link
Contributor

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@torquestomp torquestomp changed the title Revset error Revset: Allow returning errors during iteration Oct 11, 2024
@torquestomp torquestomp changed the title Revset: Allow returning errors during iteration Revset: allow returning errors during iteration Oct 11, 2024
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

Thanks!

lib/src/graph.rs Outdated Show resolved Hide resolved
lib/src/revset.rs Outdated Show resolved Hide resolved
lib/src/revset.rs Outdated Show resolved Hide resolved
@torquestomp torquestomp force-pushed the revset-error branch 2 times, most recently from 74940e6 to 4a5d0e0 Compare October 14, 2024 20:45
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

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

Thanks!

lib/src/revset.rs Outdated Show resolved Hide resolved
lib/src/git.rs Outdated Show resolved Hide resolved
lib/src/repo.rs Outdated Show resolved Hide resolved
lib/src/id_prefix.rs Outdated Show resolved Hide resolved
lib/src/id_prefix.rs Outdated Show resolved Hide resolved
lib/src/revset.rs Outdated Show resolved Hide resolved
This facilatates a change to the Revset trait in the next commit.
Custom backends may rely on networking or other unreliable implementations to support revsets, this change allows them to return errors cleanly instead of panicking.

For simplicity, only the public-facing Revset and RevsetGraph types are changed in this commit; the internal revset engine remains mostly unchanged and error-free since it cannot generally produce errors.
@torquestomp torquestomp enabled auto-merge (rebase) October 18, 2024 21:00
@torquestomp torquestomp merged commit 49e9003 into jj-vcs:main Oct 18, 2024
18 checks passed
@torquestomp torquestomp deleted the revset-error branch October 30, 2024 18:30
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