Colors rebased#3
Closed
spurnvoj wants to merge 34 commits intotimonegk:colorsfrom
Closed
Conversation
Rather than show an empty verb block when there are no verbs, just hide the block from the help text entirely. Follow-up to 6cf24ea
Explicitly support "no verb" in the logging directory setup, as opposed to treating it as an empty string or raising an exception.
There are no plans to use this feature to allow the 'colcon' executable to be invoked without a verb, but other tools built on colcon-core's framework may not want multiple verbs.
This field was removed from setuptools v72.0.0. We'll continue to read the field in colcon when the underlying setuptools version supports it, but this change drops the testing for its functionality.
The 'positive' case was previously completely uncovered on Windows, and there was also no test asserting that the caching mechanism respected differing input variables.
If the interpreter fails to construct, we don't want to reference it later. Instead, create a separate try/finally block to deal with interpreter shutdown.
The previous approach was to re-implement Interpreter.parse() to iterate over cached tokens where possible. This proved to be a problem when the implementation changed in EmPy 4.x. The approach implemented here is to create a shim between the Interpreter and Scanner API and record/inject the tokens there, which improves the compatibility by working only at the API boundary and not duplicating chunks of the upstream implementation. Co-authored-by: Chris Lalancette <clalancette@gmail.com>
There isn't a clean way to configure EmPy the way we need to which is compatible with both EmPy 3.x and 4.x. Unfortunately, this means that we'll need to have separate code paths. Additionally, EmPy 4.x doesn't take the `name` argument to Interpreter.string(). From what I can tell, it wasn't used for anything interesting anyway. In particular, exception traces still contain `<string>` instead of the file name.
This aligns with our strategy for earlier EmPy versions and avoids an assertion deep in EmPy v4 if 'output' is unspecified.
This change allows external (non-colcon) CLI implementations to specify a default for --log-base directory.
Follow-up to 77b3034
I'm not thrilled about using the deprecated 'toml' package, but tomli isn't available in Focal as a system package. The changes here will only fall back to 'toml' as a last resort, which should allow us to keep Focal support alive for a while longer.
Unfortunately, achieving colcon's arbitrary argument parsing involves reaching into argparse private API. There was recently a change to that API which was backported to stable Python releases, and this change is necessary to restore the desired behavior.
Other function groups like augmentation, identification, and discovery, can be invoked with an explicit list of extensions instances. This supports scenarios where we want to use extensions other than the ones registered for colcon_core.
This warning comes up when building ament_python packages with the --symlink-install option.
The motivation for this change is to mitigate conflicts with debian packages of colcon extensions provided by the operating system.
At this time, scspell is not available for Python 3.13 due to the removal of lib2to3. Until we have another solution, we should skip scspell on Python 3.13 so that we can add that version to the CI matrix as soon as possible.
These tests require pkg_resources, which was removed in Python 3.13.
We continue to see interference between the deb packages we publish from the colcon project and efforts to package colcon as part of mainline Debian and Ubuntu. Using a high Debian-Version value mitigated the problems in most cases, but was not sufficient to eliminate all of the conflicts we're currently experiencing. Using a debian version suffix which falls late alphabetically appears to give our packages preference by apt. If a user enables a repository which distributes packages created by the colcon project, it is likely that they wish to use these packages instead of the ones packaged by their platform.
The active executor extension already has a private variable holding the event controller, so it's not difficult to add a method to allow implementations of the executor extensions to publish events as well.
The current implementation of package discovery follows one of two paths: 1. None of the extensions were specifically enabled via a command line argument, in which case all of the extensions are engaged. 2. Some subset of the extensions were given arguments, in which case the others are ignored and their discover() methods are not called. This change adds support for discovery extensions which do not expose command line arguments and cannot therefore be specifically enabled, and ensures that those extensions are always engaged. This is a non-breaking enhancement of the PackageDiscoveryExtensionPoint interface.
This approach eliminates the heuristics for handling newlines in environment variables on platforms where 'env' supports null separation via the '-0' flag. The 'sh' shell will first attempt to use null separation and will fall back to the prior behavior.
Author
Author
|
Closing because colorful output is already supported by colcon. See comments here for examples: colcon#487 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Hi, I cherry-picked your commit onto the current master branch.