Skip to content

fix: make CSS build output deterministic#20

Merged
Ryan Bower (R-Bower) merged 1 commit into
qualcomm:mainfrom
olaf-k:olaf/fix/deterministic-css-build
Jun 5, 2026
Merged

fix: make CSS build output deterministic#20
Ryan Bower (R-Bower) merged 1 commit into
qualcomm:mainfrom
olaf-k:olaf/fix/deterministic-css-build

Conversation

@olaf-k

@olaf-k Olaf (olaf-k) commented Jun 4, 2026

Copy link
Copy Markdown
Member

this PR updates build-css to make its output predictable and stable over time.

the current code aggregates files in the order they finish processing. this has two consequences:

  • the output is non-deterministic: it depends on glob order and how long each file takes to process.
  • In dev mode, modified files get pushed to the end, since unmodified files are served from cache and complete first.

the updated code aggregates files in alphabetical order, which resolves both cases.

note: this change is marked as minor rather than patch because it modifies concatenation order of the bundle, which can affect rules with the same specificity. the only collision found was in menu and is addressed in qualcomm/qualcomm-ui#241

edit: added tests

Signed-off-by: Olaf Kappes <okappes@qti.qualcomm.com>
@olaf-k Olaf (olaf-k) force-pushed the olaf/fix/deterministic-css-build branch from 4e62986 to 9a99184 Compare June 4, 2026 14:34

@R-Bower Ryan Bower (R-Bower) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great find and fix!

@R-Bower Ryan Bower (R-Bower) merged commit 8d8a646 into qualcomm:main Jun 5, 2026
12 of 16 checks passed
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