RafaelBarbosatec / bonfire

(RPG maker) Create RPG-style or similar games more simply with Flame.
https://bonfire-engine.github.io
MIT License
1.18k stars 177 forks source link

[Bug]: latest a_star dependency breaks compilation #499

Closed kwavnet closed 2 months ago

kwavnet commented 3 months ago

What happened?

bonfire v2 branch - tested releases 2.12.6 - 2.12.8

Steps to reproduce?

flutter pub upgrade pulls in a_star_algorithm 0.3.2
pinning to  a_star_algorithm: 0.3.0 works

What did you expect to happen?

Working compilation :-)

Bonfire version

2.12.8

Relevant log output

../pub_cache/hosted/pub.dev/bonfire-2.12.8/lib/mixins/move_to_position_along_the_path.dart:231:16: Error: The argument type \'Offset\' can\'t be assigned to the parameter type \'Point<int>\'.
[   +1 ms]  - \'Offset\' is from \'dart:ui\'.
[        ]  - \'Point\' is from \'dart:math\'.
[        ]         start: playerPosition,
[        ]                ^
[        ] ../pub_cache/hosted/pub.dev/bonfire-2.12.8/lib/mixins/move_to_position_along_the_path.dart:232:14: Error: The argument type \'Offset\' can\'t be assigned to the parameter type \'Point<int>\'.
[        ]  - \'Offset\' is from \'dart:ui\'.
[        ]  - \'Point\' is from \'dart:math\'.
[        ]         end: targetPosition,
[        ]              ^
[        ] ../pub_cache/hosted/pub.dev/bonfire-2.12.8/lib/mixins/move_to_position_along_the_path.dart:233:19: Error: The argument type \'List<Offset>\' can\'t be assigned to the parameter type \'List<Point<int>>\'.
[        ]  - \'List\' is from \'dart:core\'.
[        ]  - \'Offset\' is from \'dart:ui\'.
[        ]  - \'Point\' is from \'dart:math\'.
[        ]         barriers: _barriers,
[        ]                   ^
[        ] ../pub_cache/hosted/pub.dev/bonfire-2.12.8/lib/mixins/move_to_position_along_the_path.dart:234:9: Error: A value of type \'Iterable<Point<int>>\' can\'t be assigned to a variable of type \'Iterable<Offset>\'.
[        ]  - \'Iterable\' is from \'dart:core\'.
[        ]  - \'Point\' is from \'dart:math\'.
[        ]  - \'Offset\' is from \'dart:ui\'.
[        ]       ).findThePath();
[        ]         ^
[        ] ../pub_cache/hosted/pub.dev/bonfire-2.12.8/lib/mixins/move_to_position_along_the_path.dart:237:35: Error: The argument type \'Iterable<Offset>\' can\'t be assigned to the parameter type \'Iterable<Point<int>>\'.
[        ]  - \'Iterable\' is from \'dart:core\'.
[        ]  - \'Offset\' is from \'dart:ui\'.
[        ]  - \'Point\' is from \'dart:math\'.
[        ]         result = AStar.resumePath(result);
[        ]                                   ^
[        ] ../pub_cache/hosted/pub.dev/bonfire-2.12.8/lib/mixins/move_to_position_along_the_path.dart:237:24: Error: A value of type \'List<Point<int>>\' can\'t be assigned to a variable of type \'Iterable<Offset>\'.
[        ]  - \'List\' is from \'dart:core\'.
[        ]  - \'Point\' is from \'dart:math\'.
[        ]  - \'Iterable\' is from \'dart:core\'.
[        ]  - \'Offset\' is from \'dart:ui\'.
[        ]         result = AStar.resumePath(result);
[        ]                        ^
rafaelalmeidacloudwalk commented 3 months ago

Hi @kwavnet ! You will need keep fixed the a_star_algorithm version in 0.3.0. Because new versions use Point instead Offset.