Skip to content

Make format generation idempotent#1047

Merged
mkurz merged 1 commit intoplayframework:mainfrom
reimai:stable-class-files
Jun 17, 2024
Merged

Make format generation idempotent#1047
mkurz merged 1 commit intoplayframework:mainfrom
reimai:stable-class-files

Conversation

@reimai
Copy link
Contributor

@reimai reimai commented Jun 5, 2024

Fixes

Code generated by JsMacroImpl is slightly different between compilations, the order of sealed trait's subclasses keeps changing, because they are collected into a Set in directKnownSubclasses method. I've simply changed that to a LinkedHashSet.
We're using bazel as a build tool and it's important for build to produce an exact same file for the same input, otherwise it's dependent targets are re-evaluated.

Purpose

Have better caching in bazel project using play framework.

@reimai reimai force-pushed the stable-class-files branch from 12ff8b8 to 27c2a35 Compare June 5, 2024 10:46
Copy link
Member

@mkurz mkurz left a comment

Choose a reason for hiding this comment

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

Seems legit.
Will be part of Play's next patch release.

@mkurz mkurz merged commit 50b2228 into playframework:main Jun 17, 2024
@mkurz
Copy link
Member

mkurz commented Jun 17, 2024

@Mergifyio backport 2.10.x

@mergify
Copy link
Contributor

mergify bot commented Jun 17, 2024

backport 2.10.x

✅ Backports have been created

Details

mergify bot added a commit that referenced this pull request Jun 17, 2024
[2.10.x] Make format generation idempotent (backport #1047) by @reimai
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