dart.vm.product is not set to true in --release builds
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 2
Description
Flutter seems to have landed on using dart.vm.product to indicate release mode.
https://api.flutter.dev/flutter/foundation/kReleaseMode-constant.html
How Flutter sets it:
https://github.com/flutter/flutter/blob/b7c500fc6bf04e44156722cd053020595d1fbd35/packages/flutter_tools/lib/src/compile.dart#L197
I was looking for something similar for "dart web" builds, and failed to find such. Would be nice if the Flutter way worked for `webdev build --release` or at least if some way worked. :)
Contributor guide
Research direction
Start with the webdev build --release entry point and compare its behavior with Flutter's linked packages/flutter_tools/lib/src/compile.dart implementation. Done means release web builds set dart.vm.product to true, or provide an equivalent documented way to detect release mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100