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

Deprecate cli_util -> ansi #30

Open
kevmoo opened this issue Mar 28, 2018 · 2 comments
Open

Deprecate cli_util -> ansi #30

kevmoo opened this issue Mar 28, 2018 · 2 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@kevmoo
Copy link
Member

kevmoo commented Mar 28, 2018

Trying to standardize on https://github.com/dart-lang/io/blob/master/lib/ansi.dart

@devoncarew
Copy link
Member

Following up on this issue, this package provides a few different services:

String getSdkPath()

This was the original reason why this package was created. The impl. of this method has been dramatically simplified - from 40-50 lines of code down to 1 now:

String getSdkPath() => path.dirname(path.dirname(Platform.resolvedExecutable));

I suspect that we don't need to re-home this method - that we can just mention that people can in-line this into their codebase.

applicationConfigHome

This was added more recently - it exposes some of the XDG_CONFIG_HOME standard. This can be re-homed into a 3rd party package (likely with more XDG_CONFIG_HOME functionality).

class Ansi

A simple ansi class. We would likely deprecate this and point people to package:io (and make sure that there weren't 1-2 methods that should be added to package:io in order to ease any migration to the package).

class Logger, class Progress

Classes that make it easy to write stdout for a cli tool. This includes writing to stdout and stderr, writing to a 'trace' level that user's could optionally enable (via something like a --verbose flag), and an indeterminate progress indicator. There is some coordination between the stdout output and the indeterminate progress output - so writing to stdout doesn't leave garbage characters behind on the cli.

This API is very much presentation focused - it's separate in intent from something like package:logging. This is the biggest question for me - where to host any replacement for this API? Does this match with package:io's intent - would that be a good home for it?

@kevmoo kevmoo changed the title Deprecate cli_logging -> ansi Deprecate cli_util -> ansi Feb 17, 2022
@kevmoo
Copy link
Member Author

kevmoo commented Feb 17, 2022

Good thoughts here. I'm happy to slice and dice any way. Just trying to get the number of things we need to maintain...lower 😁

@devoncarew devoncarew added the type-enhancement A request for a change that isn't a bug label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants