-
Notifications
You must be signed in to change notification settings - Fork 8k
scripts: Refactor build/runner west logging to not use deprecated APIs #97228
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
base: main
Are you sure you want to change the base?
scripts: Refactor build/runner west logging to not use deprecated APIs #97228
Conversation
Refactor build/runner scripts to not use the deprecated west logging API to stop the dozens of python warnings that happen when running west build and west flash or west whatever. Signed-off-by: Declan Snyder <[email protected]>
93dd1a9
to
61a06d0
Compare
|
@mbolivar is it really required to add some What are the best practice(s)? If any, please add them to zephyrproject-rtos/west#149, thanks! |
@marc-hb is anything missing from here in terms of best practices and rationale? |
Yes; a nicer way? :-) |
Not sure what you're asking for, but the successor to the global state in the west.log module is the per-instance state in https://github.com/zephyrproject-rtos/west/blob/594a789d19f2c66c1937210e67bf9e59c2a4387c/src/west/commands.py#L410. Your objection seems to be about the verbosity of passing a WestCommand instance around instead of implicitly relying on the global state. I guess one potentially 'nicer' way to handle that here would be to reorganize this code to stash the WestCommand in an instance variable inside of a new class instead of using module-level functions. I don't have any other suggestions right now. |
Refactor build/runner scripts to not use the deprecated west logging API to stop the dozens of python warnings that happen when running west build and west flash or west whatever.
Fixes #92475
This all has to be one commit because of all the coupling of dependencies across these scripts, it would not be bisectable any other way.