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

Investigate and track colorized CMake/Build output API dependencies #3683

Closed
sinemakinci1 opened this issue Apr 2, 2024 · 8 comments
Closed
Assignees
Labels
bug a bug in the product
Milestone

Comments

@sinemakinci1
Copy link
Contributor

Brief Issue Summary

Investigation tracking item for #478 to ensure API dependencies are tracked and completed where relevant

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@sinemakinci1 sinemakinci1 added this to the 1.18 milestone Apr 2, 2024
@github-actions github-actions bot added the triage label Apr 2, 2024
@github-project-automation github-project-automation bot moved this to Triage Needed in CMake Tools Apr 2, 2024
@gcampbell-msft gcampbell-msft added bug a bug in the product and removed triage labels Apr 4, 2024
@gcampbell-msft
Copy link
Collaborator

Some locations that will help investigate: microsoft/vscode#145234 (comment), microsoft/vscode#209548

@gcampbell-msft gcampbell-msft moved this from Triage Needed to To Do in CMake Tools Apr 9, 2024
@gcampbell-msft
Copy link
Collaborator

Update on the API: microsoft/vscode#145234 (comment)

@gcampbell-msft
Copy link
Collaborator

gcampbell-msft commented Apr 10, 2024

Overall, I think that the main two options for solving the colorized CMake build output is the following:

  1. Improve the syntax textmate that we provide for the CMake/Build output pane.
    1. This is technically already solved through a workaround mentioned here: Colorized CMake/Build output #478 (comment). This could be added as a dependency or brought in-box to make it easier.
  2. Modify our tasks support (cmake) and our shell integration to use the proposed API here: Expose shell integration command knowledge to extensions vscode#145234 (comment)
    1. I think that this would include modifying our CustomBuildTaskTerminal class to use the new API.

@gcampbell-msft
Copy link
Collaborator

Adding reference #2783

@gcampbell-msft
Copy link
Collaborator

gcampbell-msft commented Apr 11, 2024

Overall, in response to this comment and adding more context: #3683 (comment).

  1. I don't think there is work to do for the output pane. If people want colorization for their output pane, they will have to do something external either way because of the Output Channel not supporting colors from VS Code. There are currently workarounds for this that currently work for a decent amount of people.
  2. The way that we can provide colorization to users that explicitly want it is through tasks, either manually created by them, or by fixing our tasks support to go through the new Terminal API that is being developed here: Expose shell integration command knowledge to extensions vscode#145234 (comment)
    1. There is one note to make here, and that is that colorization will happen in the terminal. BUT, there may be additional steps in their CMake project that they need to take either way, in order to get colorization to happen. https://cmake.org/cmake/help/latest/variable/CMAKE_COLOR_DIAGNOSTICS.html, https://stackoverflow.com/questions/9963783/how-can-i-configure-cmake-to-generate-a-buildsystem-that-emits-colored-errors-an, etc.

@gcampbell-msft
Copy link
Collaborator

gcampbell-msft commented Apr 11, 2024

I've done minimal testing and chatting with the maintainers here microsoft/vscode#145234 (comment), and while it's not EXACTLY what we want in terms of a simple async-await pattern for invoking a command and getting the exit code, we can definitely use the API to do what we want. Therefore, this API, once officially supported/released, can be used for our task support and we should be able to provide an officially supported way to route tasks (or build) to a terminal and have colorization (assuming their project is set up for colorization in the terminal).

@sinemakinci1 @microsoft/vscode-cmake FYI.

@thernstig
Copy link

@gcampbell-msft microsoft/vscode#145234 has been implemented :)

@gcampbell-msft
Copy link
Collaborator

@thernstig Thanks for the ping. We'll make a note of this so that we have it in mind when considering/prioritizing our work. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product
Projects
Status: Completed
Development

No branches or pull requests

3 participants