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

Update to yansi 1.0 #7709

Closed
DaniPopes opened this issue Apr 18, 2024 · 5 comments · Fixed by #7735
Closed

Update to yansi 1.0 #7709

DaniPopes opened this issue Apr 18, 2024 · 5 comments · Fixed by #7735
Assignees
Labels
D-chore Difficulty: chore first issue A good way to start contributing T-feature Type: feature

Comments

@DaniPopes
Copy link
Member

Component

Other (please describe)

Describe the feature you would like

yansi 1.0 was recently released with a much better API, by turning the Paint struct into a trait implemented on all types. This will also require updating it in foundry-compilers.

Additional context

No response

@DaniPopes DaniPopes added first issue A good way to start contributing T-feature Type: feature D-chore Difficulty: chore labels Apr 18, 2024
@dcb9
Copy link
Contributor

dcb9 commented Apr 19, 2024

Hi @DaniPopes, I'd like to take this as a good start to be familiar with foundry

@mattsse
Copy link
Member

mattsse commented Apr 19, 2024

cool,
we also need the same thing in the compilers repo

https://github.com/foundry-rs/compilers/blob/f58ff011f234bac39dd0a9c79420c7b894988597/Cargo.toml#L44

@dcb9
Copy link
Contributor

dcb9 commented Apr 19, 2024

thanks, yeah I'll start with foundry-compilers first

@dcb9
Copy link
Contributor

dcb9 commented Apr 19, 2024

according to the update ctron/colored_json#10, we do not need to check the platform, so I'll just remove the code and update the doc

/// Disables terminal colours if either:
/// - Running windows and the terminal does not support colour codes.
/// - Colour has been disabled by some environment variable.
/// - We are running inside a test
pub fn enable_paint() {
let is_windows = cfg!(windows) && !Paint::enable_windows_ascii();
let env_colour_disabled = std::env::var("NO_COLOR").is_ok();
if is_windows || env_colour_disabled {
Paint::disable();
}
}

DaniPopes pushed a commit to foundry-rs/compilers that referenced this issue Apr 19, 2024
@mattsse
Copy link
Member

mattsse commented Apr 19, 2024

fyi release a new foundry-compilers patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-chore Difficulty: chore first issue A good way to start contributing T-feature Type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants