Skip to content

Sort migrations when embedding them using embed_migrations macro - #439

Merged
jxs merged 4 commits into
rust-db:mainfrom
silverpill:refinery-0-8-repro
Oct 1, 2026
Merged

jxs merged 4 commits into
rust-db:mainfrom
silverpill:refinery-0-8-repro

Conversation

@silverpill

Copy link
Copy Markdown
Contributor

By default, WalkDir::into_iter returns entries in the unspecified order:

The order is unspecified but if sort_by is given, directory entries are sorted according to this function.

This code is executed at compile time, so the result is not deterministic and that leads to non-reproducible builds (https://reproducible-builds.org/).

This patch enables sorting of directory entries, which makes the result deterministic.

Comment thread refinery_core/src/util.rs Resolved
@silverpill

Copy link
Copy Markdown
Contributor Author

@jxs It looks like the bot accidentally closed the pull request.

@jxs jxs reopened this Oct 1, 2026

@jxs jxs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, this better than #442 as we don't need to iterate again

@jxs
jxs merged commit 14cbf92 into rust-db:main Oct 1, 2026
30 checks passed
jxs added a commit that referenced this pull request Oct 2, 2026
Bump versions to 0.10.0 in all crates and update inter-crate dependency references.

Add 0.10.0 changelog entries for native async fn traits (#431), sorted
embedded migrations (#439, #442), tiberius 0.13.x (#451), rusqlite
0.40.x (#445), MSRV 1.92 with rust-version inheritance (#431, #453),
and dependency advisory bumps (#446).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants