Skip to content

Non-deterministic ordering of @supports conditions #137

@lucacasonato

Description

@lucacasonato

Just had this failure locally while running cargo test:

failures:

---- bundler::tests::test_bundle stdout ----
thread 'bundler::tests::test_bundle' panicked at 'assertion failed: `(left == right)`
  left: `"@supports ((foo: bar) or (color: red)) {\n  .b {\n    color: green;\n  }\n}\n\n.a {\n  color: red;\n}\n"`,
 right: `"@supports ((color: red) or (foo: bar)) {\n  .b {\n    color: green;\n  }\n}\n\n.a {\n  color: red;\n}\n"`', src/bundler.rs:685:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    bundler::tests::test_bundle

test result: FAILED. 76 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

It seems to have occurred because the sort order of the @supports conditions is not deterministic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions