Description
The refactoring in #1643 does a blanket checksum over the whole json representation of the config, this leads to the build-directory changing and cache disappearing for various config elements that should not have this effect:
linkConfig.assetsForLinking
[native_assets_builder] KeepoutputDirectory
ifLinkConfig.assets
changes #1746config.codeConfig.cCompiler
config.codeConfig.targetIOSVersion
,.targetMacOSVersion
,.targetAndroidNdkApi
If any of these change, we're likely not interested in any previous invocations of the same hook with the previous versions. (Note for config.codeConfig.targetIOSSdk
we do actually want to cache the simulator and device separately, because you'd actually switch between building those in a Flutter project.)
I worked around linkConfig.assetsForLinking
by applying setupLinkConfig
after computing the hash, but that doesn't work for setupCodeConfig
, because some parts should be taken into account for the hash while others don't.
Possible solutions:
- Keep a
json
and ajsonForChecksum
. - Keep a
listOfPathsForChecksum
Side note, currently the checksum is dependent on the order in which the separate parts are added. This is a bug, the maps in the JSON should be regarded as inherently unsorted.
Possible solutions:
- recursively sort before hashing
- Use a hashing algorithm for sets
cc @mkustermann
Metadata
Metadata
Assignees
Labels
Type
Projects
Status