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

[DRAFT] Add bulk logging of function invocations. misc DX #2223

Draft
wants to merge 1 commit into
base: community
Choose a base branch
from

Conversation

tastycode
Copy link
Contributor

leaving in draft while I get back up to speed the process for proposing changes. Most of this I wrote 6 months ago, but it was n't relevant enough to risk bundling it in with some other changes.

This is 2 additional DBT tasks along with supporting documentation changes and an additional macro. Nothing user facing.

  1. Allow devs to bulk annotate entire directory-trees of function calls with logging calls that record each invocation of a function into the debug log (without arguments)
  2. a convenience script for parsing deluge crash reporter output.

while experiencing a bout of ADHD, I added a macro D_POPUP which is a convenient sprintf enabled dev shortcut.

  • Ensures the popup only exists in dev builds
  • Allows sprintf-style invocation e.g. D_POPUP("%d bottles of beer on the wall", 99)
  • Always logs to the debug log
  • Does not try to display log messages longer than 100 char
  • Falls back in case display->displayPopup is not available.

@tastycode tastycode changed the title Add bulk logging of function invocations. misc DX DRAFT: Add bulk logging of function invocations. misc DX Jul 3, 2024
Copy link
Contributor

github-actions bot commented Jul 3, 2024

Test Results

75 tests  ±0   75 ✅ ±0   0s ⏱️ ±0s
13 suites ±0    0 💤 ±0 
13 files   ±0    0 ❌ ±0 

Results for commit 4b0f291. ± Comparison against base commit 9a7a623.

♻️ This comment has been updated with latest results.

@tastycode tastycode force-pushed the 20240702-creative-debug-qol branch from c34f169 to 30f87ad Compare July 3, 2024 06:11
Copy link
Collaborator

@sapphire-arches sapphire-arches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to use a black compatible with the workflow version (currently 24.4.2) to get the Python format check to pass - it looks like it picked up an actual bug in the format strings though.

I like libclang/libtooling as a basis for some stuff, though I'm a little concerned it'll add like 300 megabytes to the toolchain build next time we run it. Do you have an idea of the size it adds to the site-packages when installed?

with open(tags_file, "w+") as tags_file_pointer:
tags_file_pointer.write(result.stdout.decode('utf-8'))
else:
print(f"Failed to invoke {" ".join(ctags_invocation)}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print(f"Failed to invoke {" ".join(ctags_invocation)}")
print(f"Failed to invoke {' '.join(ctags_invocation)}")

Looks like the python format check picked up an actual bug in this format string.

Comment on lines 6 to 7
libclang
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to add these dependencies they should be version locked.

@m-m-adams m-m-adams marked this pull request as draft July 5, 2024 03:16
@m-m-adams m-m-adams changed the title DRAFT: Add bulk logging of function invocations. misc DX Add bulk logging of function invocations. misc DX Jul 5, 2024
@tastycode tastycode force-pushed the 20240702-creative-debug-qol branch from 30f87ad to 4b0f291 Compare July 22, 2024 17:10
@seangoodvibes seangoodvibes changed the title Add bulk logging of function invocations. misc DX [DRAFT] Add bulk logging of function invocations. misc DX Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants