File tree 3 files changed +23
-0
lines changed
pkgs/native_assets_cli/lib/src 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,13 @@ extension CodeAssetsLinkConfig on LinkConfig {
216
216
}
217
217
218
218
extension type LinkConfigCodeAssets (LinkConfig _config) {
219
+ // Returns the code assets that were sent to this linker.
220
+ //
221
+ // NOTE: If the linker implementation depends on the contents of the files the
222
+ // code assets refer (e.g. looks at static archives and links them) then the
223
+ // linker script has to add those files as dependencies via
224
+ // [LinkOutput.addDependency] to ensure the linker script will be re-run if
225
+ // the content of the files changes.
219
226
Iterable <CodeAsset > get all => _config.encodedAssets
220
227
.where ((e) => e.type == CodeAsset .type)
221
228
.map (CodeAsset .fromEncoded);
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ extension DataAssetsLinkConfig on LinkConfig {
118
118
}
119
119
120
120
extension type LinkConfigDataAssets (LinkConfig _config) {
121
+ // Returns the data assets that were sent to this linker.
122
+ //
123
+ // NOTE: If the linker implementation depends on the contents of the files of
124
+ // the data assets (e.g. by transforming them, merging with other files, etc)
125
+ // then the linker script has to add those files as dependencies via
126
+ // [LinkOutput.addDependency] to ensure the linker script will be re-run if
127
+ // the content of the files changes.
121
128
Iterable <DataAsset > get all => _config.encodedAssets
122
129
.where ((e) => e.type == DataAsset .type)
123
130
.map (DataAsset .fromEncoded);
Original file line number Diff line number Diff line change 1
1
## 1.6.0
2
2
3
3
- No changes, but rev version due to BuildConfig change.
4
+ - ** Breaking change** Link hooks now have to explicitly add any file contents
5
+ they rely on via ` output.addDependency() ` to ensure they re-run if the
6
+ content of those files changes. (Previously if a linker script obtained code
7
+ or data assets, the files referred to by those assets were implicitly added as
8
+ a dependency, but adding custom asset types changed this behavior)
9
+ NOTE: Newer Dart & Flutter SDKs will no longer add those dependencies
10
+ implicitly which may make some older linker implementations that do not add
11
+ dependencies explicitly not work correctly anymore: The linker scripts have
12
+ to be updated to add those dependencies explicitly.
4
13
5
14
## 1.5.0
6
15
You can’t perform that action at this time.
0 commit comments