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

fix: invalid CLI use in scripts/{enable,disable}_log_statements.sh #546

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

wookayin
Copy link
Member

@wookayin wookayin commented Oct 17, 2023

  • find -name => find . -name
  • xargs -i => xargs -I (or can be replaced by the for loop)
  • Use bash for loop instead of xargs to abort early when erorr happens
  • Have one whitespace after # in the comments to conform with the
    standard python code style

(should the commit message be prefixed with packaging: or fix: ?)

@wookayin wookayin changed the title fix: invalid CLI use in scripts/disable_log_statements.sh fix: invalid CLI use in scripts/{enable,disable}_log_statements.sh Oct 18, 2023
- `find -name` => `find . -name`
- `xargs -i` => `xargs -I` (or can be replaced by the for loop)
- Use bash for loop instead of xargs to abort early when erorr happens
- Have one whitespace after `#` in the comments to conform with the
  standard python code style
find -name '*.py' | xargs -i{} ../scripts/logging_statement_modifier.py {}
for f in $(find . -name '*.py'); do
echo "Processing: $f"
../scripts/logging_statement_modifier.py "$f"
Copy link
Member

Choose a reason for hiding this comment

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

For reference: this script is a hack to workaround performance issues: #250

Ideally we would avoid costly logging in a more architectural way rather than a build-time hack.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, fully agreed; this seems really hacky. Just quick-fixing the shell script for now because it didn't work in macOS :)

@justinmk justinmk merged commit b8ef69a into neovim:master Nov 13, 2023
19 checks passed
@wookayin wookayin deleted the fix-script branch November 13, 2023 19:55
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