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

Undocumented API breakage from 0.2.2 to 0.3.0 #42

Closed
msprotz opened this issue Apr 30, 2024 · 5 comments
Closed

Undocumented API breakage from 0.2.2 to 0.3.0 #42

msprotz opened this issue Apr 30, 2024 · 5 comments
Assignees

Comments

@msprotz
Copy link

msprotz commented Apr 30, 2024

029cbc0 removed the Size module from the .mli of Terminal.

I was previously relying on that functionality to not have to re-implement the terminal width detection logic myself.

Can you either re-instate the Size module within Terminal, or suggest a replacement? Thanks!

@dinosaure
Copy link
Collaborator

Really sorry, I didn't know this package was used (I thought only progress used the package). The reason for the pointed commit is to be able to use progress.engine in a unikernel and not depend on functions that only a Unix environment can provide.

A solution which could satisfy you and continue to ensure this constraint would be to propose a new terminal.unix package in order to reintroduce the functions you use in a new Terminal_unix module. /cc @art-w WDYT?

@msprotz
Copy link
Author

msprotz commented May 3, 2024

I think that'd be great! I don't know how I ended up using this package, perhaps I saw something called terminal on opam written by a trustworthy author and decided it was a fine dependency to take on? ;-)

@art-w
Copy link
Contributor

art-w commented May 3, 2024

Oups my bad! I'll make a PR shortly with a new terminal.unix to re-expose the lost Size functions :)

dinosaure added a commit to dinosaure/opam-repository that referenced this issue May 20, 2024
CHANGES:

- Revert the `terminal` API and keep an "happy" path to get size of a tty
  and be compatible with MirageOS (@art-w, @msprotz, craigfe/progress#42, craigfe/progress#43)
- Use a `float` instead of a `int` in `flow_meter per-second` (@mbarbin, craigfe/progress#23, craigfe/progress#27)
@dinosaure
Copy link
Collaborator

@msprotz The last version (0.4.0) fixed your issue (thanks @art-w for your work). You should just put a constraint now and require terminal.0.4.0. Can you tell me if it's correct?

@msprotz
Copy link
Author

msprotz commented May 31, 2024

It works, thanks!

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

No branches or pull requests

3 participants