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

transformer: incorrect temporary variable name #5371

Closed
Boshen opened this issue Aug 31, 2024 · 3 comments · Fixed by #5407
Closed

transformer: incorrect temporary variable name #5371

Boshen opened this issue Aug 31, 2024 · 3 comments · Fixed by #5407
Assignees
Labels
A-transformer Area - Transformer / Transpiler blocker C-bug Category - Bug

Comments

@Boshen
Copy link
Member

Boshen commented Aug 31, 2024

in:

output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"]

out:

var _output$headers$x-amzn-requestid;
(_output$headers$x-amzn-requestid = output.headers["x-amzn-requestid"]) !== null && _output$headers$x-amzn-requestid !== void 0 ? _output$headers$x-amzn-requestid : output.headers["x-amzn-request-id"];

expected

var _output$headers$xAmz;
(_output$headers$xAmz = output.headers["x-amzn-requestid"]) !== null && _output$headers$xAmz !== void 0 ? _output$headers$xAmz : output.headers["x-amzn-request-id"];

https://github.com/oxc-project/monitor-oxc/actions/runs/10646542195/job/29513518443

Note there's also other cases such as options['grpc.enable_http_proxy'] ?? 1

@Boshen Boshen added C-bug Category - Bug A-transformer Area - Transformer / Transpiler labels Aug 31, 2024
@Dunqing
Copy link
Member

Dunqing commented Sep 1, 2024

@Boshen
Copy link
Member Author

Boshen commented Sep 2, 2024

Blocks monitor-oxc

@overlookmotel
Copy link
Contributor

overlookmotel commented Sep 3, 2024

Fixed in #5407.

NB: We only altered generate_uid_based_on_node. generate_uid still assumes the input is a valid identifier (intentionally - usually we already know it is, so it's the caller's responsibility to check that it is, if it's uncertain).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler blocker C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants