Conversation
forge2d asked for code_assets ^1.2.1, so an app that also depends on a package built against code_assets 2 (flutter_soloud, for one) could not resolve. The constraint now takes both majors. The lower end stays, because hooks 2.1 and later need meta 1.19, which Flutter 3.44.0 does not ship. The build hook uses nothing that differs between the two.
dzolotov
force-pushed
the
chore/code-assets-2
branch
from
October 1, 2026 14:44
03624a1 to
55ce189
Compare
Author
|
Closing this: I split the audio code in the package that pulled in flutter_soloud, so the Flame workspace resolves with forge2d's current constraint and nothing here needs to change. |
Member
|
It's a good idea to bump to ^2.0.0 anyways so I did it here: #123 |
Member
|
@dzolotov forge2d v0.15.2 with the version bump is now released |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
forge2d asks for
code_assets ^1.2.1, so an app that also depends on something built againstcode_assets2 can't resolve at all.flutter_soloud5.x is one such package. I ran into this while adding a package to the Flame monorepo: it reaches SoLoud through its dependencies,flame_forge2dsits in the same workspace, and the workspace stopped resolving.This widens the constraint to
">=1.2.1 <3.0.0"and leaveshooksandnative_toolchain_calone. My first push raised the floor to^2.1.0instead, and that was wrong.code_assets2 needshooks ^2.2.0, which pulls inrecord_useandmeta ^1.19.0. Flutter 3.44.0 pinsmetato 1.18.0, so on Flame's minimum Flutter version forge2d would not resolve. With the range, 3.44.0 still gets 1.2.1 and newer SDKs can pick 2.x.hook/build.dartdoesn't change. I randart analyzeand the whole suite at both ends of the range:code_assets1.2.1 withhooks2.0.0 andnative_toolchain_c0.19.0, thencode_assets2.1.0 withhooks2.2.0 andnative_toolchain_c0.19.5. Both report only theprefer_if_elements_to_conditional_expressionsinfo that is already on main, and all 114 tests pass on macOS arm64 with the hook building Box2D from source.One thing that tripped me up when running the suite:
test/api/length_unit_test.dartfails if all the test files share one isolate, because the length unit is process-wide and another file has already created aWorld. Plaindart testruns each file in its own isolate, so it's fine there. I didn't touch it.Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examples.Breaking Change
Related Issues