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

Make TermUi internal to the library #344

Closed
wants to merge 2 commits into from

Conversation

guuilp
Copy link

@guuilp guuilp commented Apr 4, 2022

The Clikt user can be sometimes confused: should I echo or TermUi.echo? should I prompt or TermUi.prompt?

To make those answers obvious, I've made TermUi internal to the library and added the missing proxy functions: editText and editFile.

This solution also make unit testing easier, since the proxy functions on CliktCommand already passes currentContext.console to TermUil.prompt, TermUi.echo and TermUi.confirm.

@guuilp
Copy link
Author

guuilp commented Apr 4, 2022

This is a breaking change. If you agree with this change, maybe it's worth releasing an intermediate version just adding @Deprecated to TermUi and also removing its references from the docs.

@ajalt
Copy link
Owner

ajalt commented Apr 4, 2022

Yes, we'll need to keep TermUi public for now and mark all its functions as @Deprecated with a message pointing to the new locations.

@ajalt
Copy link
Owner

ajalt commented Apr 25, 2022

Merged locally as 3371bef, thanks! I decided to leave editFile and editText as-is, since they don't use the console or other CliktCommand state.

@championswimmer
Copy link

But isn't ClicktCommand.prompt protected ? How are we to use this?

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.

3 participants