Comments (6)
The idea of having a compile
method where you call it with "oh, actually don't compile, but do run some other byproduct thing" seems weird.
For the one-off-run I think introducing a --native-only=<whateverFile>
or something would make sense.
For the "stdin protocol" I think it would be cleaner to have a separate command.
from sdk.
That makes sense. 👍
I have no idea if we are ever in a situation where we would have two different byproducts that we want to compile in a single invocation. But assuming no, specifying byproduct-only makes more sense than not-main-thing.
Startup / single shot commandline API:
- (already existing)
--native-assets=<file>
sets the side product for when compiling the full thing, either immediately or with subsequentcompile
s over the protocol. - (new option A)
--native-assets-only
(no file), should be supplied together with--native-assets=<file>
- (new option B)
--native-assets-only=<file>
The protocol
- (already existing)
native-assets <file>
sets the side product for when compiling the full thing with subsequentcompile
s. - (new option A)
native-assets-only
after already having sentnative-assets <file>
before - (new option B)
native-assets-only <file>
@jensjoha any preference for whether we add the <file>
to native-assets-only
, or whether it should be supplied with the already existing flag and command?
from sdk.
Already having --native-assets=<file>
and native-assets <file>
I suppose the native-assets-only
without file makes more sense. I don't immediately have strong feelings about it though ;)
from sdk.
Already having
--native-assets=<file>
andnative-assets <file>
I suppose thenative-assets-only
without file makes more sense. I don't immediately have strong feelings about it though ;)
I had the same, not so strong, feelings. 👍
from sdk.
Compiling without an entry point could affect tree shaking (basically make it impossible, it has no root).
It's that a problem?
from sdk.
Compiling without an entry point could affect tree shaking (basically make it impossible, it has no root). It's that a problem?
"Compiling" is a bit of a strange word here. We're creating an encoding of the native_assets.yaml
in a dart library.
sdk/pkg/vm/lib/native_assets/synthesizer.dart
Lines 46 to 55 in 637f3b2
And yes, this encoding only uses VM-recognized classes (list, string, map, and pragma), so that tree-shaking of the Dart program this special library is concatenated to can be read by the VM.
from sdk.
Related Issues (20)
- WASM incorrectly advertises dart.library.js HOT 2
- CFE fails to notice record field name differences when performing subtype matches HOT 1
- extension type on a Function named call HOT 7
- Invalid fixes being suggested
- Add a fix to create an extension method
- How should I load JS libraries from within WASM? HOT 2
- Macros: Failure to compile redirecting factories HOT 2
- [resource_identifiers] Rename to recorded_references. HOT 1
- [native_assets][resource_identifiers] Deferred loading and assets HOT 2
- Dart WebSocket Connection to webserver Exhibits Inconsistent Behavior and Premature Closure HOT 3
- JsonCodable macro field names HOT 3
- Support `environment` parameter for `Isolate.spawnUri` HOT 7
- Switch to RBE broke tools/generate_idefiles.py and compile_commands.json HOT 1
- Consider `EXTRANEOUS_MODIFIER` diagnostic improvements
- Dart LSP re-analyzes project when typing starts after period of inactivity HOT 6
- Move `Listenable`, `ValueListenable`, `ChangeNotifier` and `ValueNotifier` to the Dart sdk and add listening methods HOT 22
- Erroneous RangeError when compiling to WASM HOT 5
- [CP] [ CLI ] Fix DART_VM_OPTIONS usage only resulting in printing of help message HOT 8
- error: cast from 'BootstrapNativeFunction' (aka 'ObjectPtr (*)(Thread *, Zone *, NativeArguments *)') to 'Dart_NativeFunction' (aka 'void (*)(_Dart_NativeArguments *)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] HOT 1
- `dart test --help` does not work without pubspec.yaml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.