Skip to content

fix: prevent uglifying class and function names when bundling codewhisperer #909

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

Conversation

francescoopiccoli
Copy link
Contributor

@francescoopiccoli francescoopiccoli commented Apr 3, 2025

Problem

When running bundled codewhisperer server, the webpack bundling uglifies/minimizes class names, hence making the logs of certain class/function names not recognizable.
To reproduce this try running CodeWhisperer Server Token debug config and check the AWS Document Language Server tab logs, you can see something like "Configured AWS SDK V3 Proxy for Po".

Solution

Directly hard code class names for logging from language servers, avoid logging class name from runtimes.
Related PR in runtimes: aws/language-server-runtimes#412

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@francescoopiccoli francescoopiccoli requested a review from a team as a code owner April 3, 2025 15:19
@francescoopiccoli francescoopiccoli merged commit 68e692a into main Apr 17, 2025
6 checks passed
@francescoopiccoli francescoopiccoli deleted the frapicc/prevent-uglifying-class-function-names-codewhisperer-bundling branch April 17, 2025 13:50
nborges-aws pushed a commit that referenced this pull request Apr 17, 2025
…ing when bundled (#909)

* fix: prevent uglifying class and function names when bundling codewhisperer

* chore: fix format

* fix: add missing import

* feat: log class name from language servers (not from runtimes)

* fix: log directly hardcoded class name, undo keep class and file names

* fix: merge conflicts + updated logging after merge

* feat: add hardcoded logging for new iam streaming client

---------

Co-authored-by: Francesco Piccoli <[email protected]>
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.

3 participants