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

RFC: switch builtin pager to streampager #4203

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Aug 3, 2024

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

Cargo.toml Outdated
@@ -101,6 +101,7 @@ smallvec = { version = "1.13.2", features = [
"const_new",
"union",
] }
streampager = "0.10.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps, "CC0-1.0" can be allowed, but I haven't updated the list yet.
https://github.com/martinvonz/jj/actions/runs/10224603116/job/28292547146?pr=4203#step:4:83

@ilyagr
Copy link
Contributor

ilyagr commented Aug 3, 2024

I would really like a version of streampager with its dependencies updated for this (can/should we ask the Facebook people to do it? Should we fork it?). It's annoying to have to link an old version of clap (see the diff in Cargo.toml).

IIRC, streampager's interface seemed a bit annoying in parts by default, so we might want to change its default config (or try it out at least).

Apart from that, I think this might be great!

@yuja
Copy link
Contributor Author

yuja commented Aug 3, 2024

I would really like a version of streampager with its dependencies updated for this

Totally agree, and the stripped-down version exists in Sapling tree. Asked question at markbt/streampager#61

@yuja yuja marked this pull request as draft August 3, 2024 14:30
@yuja yuja force-pushed the push-vwqpwvoxokrt branch from 8cb0ad3 to 193516d Compare August 5, 2024 02:16
yuja added 5 commits August 17, 2024 12:22
This brings lots of old crates as dependency, and some of them aren't needed for
our use case. Though streampager looks stable, that's unfortunate.
According to the discussion on Discord, streampager is still maintained.
It brings more dependencies, but seems more reliable in our use case. For
example, the streampager doesn't consume inputs indefinitely whereas minus
does. We can also use OS-level pipe to redirect child stderr to the pager.
@yuja yuja force-pushed the push-vwqpwvoxokrt branch from 193516d to 7ea0283 Compare August 17, 2024 03:25
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