Daco Harkes

Results 416 comments of Daco Harkes
trafficstars

Notes from discussion with @mosuem: The interaction between `build.dart` and `link.dart` should probably be as follows: 1. build.dart outputs code/data assets if they should not be tree-shaken 2. build.dart outputs...

> Sounds good. The deferred loading can be just delegated to the packages own `AssetBundle` implementation based on a the mapping between loading units and call sites reported from that...

Or did we want to depend on "component name"? But also that requires code generation. E.g. a package author does not know what the component name is where their file...

Having `build.dart` specify the linker that an asset is destined for covers our initial use cases. We can later extend it to have applications overwrite that. https://github.com/dart-lang/native/issues/994#issuecomment-1999363039

> * Not include an asset at all if it's not referenced from Dart code. > * Shrinking the contents of an asset if only a subset of its contents...

> `safe` And then we should probably add a warning on the stderr or stdout when building and one of the hooks reports assets with `safe` but there are dynamic...

It sounds like the dynamic linker tries to find the required symbol during dlopen and can't find the one. Did you declare but not define the variable? https://stackoverflow.com/questions/1410563/what-is-the-difference-between-a-definition-and-a-declaration

> Instead, this would be preferable: > > ```dart > class CanStatus { > final int value; > const CanStatus._(this.value); > > static const OK = CanStatus(1); > static const...

> Given that this is a simple enough rewrite with immediate benefits (and hopefully non-breaking) It's a breaking change, we might have users putting enum values in ints and vice...

Thanks @eernstg ! ```dart enum CanStatus { ok(1), socketCreateError(2), example(1); ``` @eernstg are `ok(1)` and `example(1)` equal? They have to be. Because C returns us an int, so FFIgen will...