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

Oxc crate v0.17.0 is yanked #4060

Closed
Boshen opened this issue Jul 5, 2024 · 2 comments
Closed

Oxc crate v0.17.0 is yanked #4060

Boshen opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
C-bug Category - Bug P-high Priority - High

Comments

@Boshen
Copy link
Member

Boshen commented Jul 5, 2024

There is a huge behavior change in the visitor where expression visits are missed.

e.g.

Before:

    pub fn walk_expression_array_element<'a, V: Visit<'a>>(visitor: &mut V, expr: &Expression<'a>) {
        let kind = AstKind::ExpressionArrayElement(visitor.alloc(expr));
        visitor.enter_node(kind);
        visitor.visit_expression(expr);
        visitor.leave_node(kind);
    }

v0.17.0:

    pub fn walk_expression_array_element<'a, V: Visit<'a>>(visitor: &mut V, it: &Expression<'a>) {
        let kind = AstKind::ExpressionArrayElement(visitor.alloc(it));
        visitor.enter_node(kind);
        match it {
            Expression::BooleanLiteral(it) => visitor.visit_boolean_literal(it),
            Expression::NullLiteral(it) => visitor.visit_null_literal(it),
            Expression::NumericLiteral(it) => visitor.visit_numeric_literal(it),
            Expression::BigIntLiteral(it) => visitor.visit_big_int_literal(it),
            Expression::RegExpLiteral(it) => visitor.visit_reg_exp_literal(it),

THIS IS A BUG.

@Boshen Boshen added C-bug Category - Bug P-high Priority - High labels Jul 5, 2024
Boshen pushed a commit that referenced this issue Jul 5, 2024
#4061)

hotfix for #4060

I just added an edge case, We can come back to it later on and make it a
standard in our codegen.

The diff is big because it causes the code to reorder, The edge case
generated code doesn't follow the order in which they are defined in the
source of truth(eg `js.rs`)
@rzvxa
Copy link
Contributor

rzvxa commented Jul 5, 2024

Let's keep this one open for a few days in case of any other issues.

@rzvxa
Copy link
Contributor

rzvxa commented Jul 7, 2024

closed for housekeeping since it seems to be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug P-high Priority - High
Projects
None yet
Development

No branches or pull requests

2 participants