Comments (4)
This is tricky.. We only show it when the service.reloadSources
service is available, however Flutter web pretends that Hot Reload is available and hot restarts.
It would be better IMO if the extension doesn't need to make assumptions about which devices on which SDKs pretend to support hot restart but don't (Dart-Code versions are quite independent of SDK versions) - it feels like adding technical debt. It would be better if we use the existing mechanisms (presence of services) to know when the functionality is available and if the rules every change, nothing needs updating in Dart-Code (and therefore older versions of Dart-Code would also behave as expected).
There were some comments about this at flutter/flutter#39950 (comment) but I don't think I entirely understand the reasons.
from dart-code.
Fyi @elliette. We should stop pretending we support hot reload when we don't on the web. I didn't realize we were pretending as DevTools makes it look like it is able to accurately detect that the web doesn't support hot reload.
from dart-code.
I was only thinking about Flutter when I wrote the above, but now I'm wondering if we have a similar but slightly different issue for non-Flutter web, because the condition there is different (for non-Flutter, we assume the VM always has the VM Service's reload service.. but maybe that's also untrue for non-Flutter web).
So for Flutter web, I think we shouldn't register the reloadSources service, but for non-Flutter maybe we're lacking a way to know if Hot Reload is available. Dart-Code doesn't really distinguish between a Dart VM or DWDS, and assumes for a Dart (non-Flutter) project we can call reloadSources without any service explicitly being registered (since the Dart VM does not register a service for it, it's just a native method).
from dart-code.
My understanding based on the comments in flutter/flutter#39950, it seems like this was originally done to support Flutter's r
hot-key on web (which normally triggers a hot-reload but for web triggers the hot-restart).
@yjbanov is this correct? I wonder if it would make sense to support r
triggering hot-restart, without registering reloadSources
for web.
from dart-code.
Related Issues (20)
- Extension restart error
- Semantic Tokens For Getter-Setters HOT 7
- Incorrect TM Token for Generics HOT 1
- Add a way to copy the DTD uri HOT 2
- build for windows fails with LNK2001: unresolved external symbol HOT 2
- Add More Semantic Tokens HOT 1
- Issue on website (Upstream Issues) - an issue on the list is closed, should be removed. HOT 1
- DTD is sometimes not terminated correctly HOT 4
- Disable shellExecute in safeSpawn() when we know we don't need it
- Unable to select Android emulator after first debug session HOT 10
- DTD should be disabled for internal bazel workspaces
- Language status information doesn't show up for generated file schemes
- Support "dart fix" directly in the IDE (applied over overlays, with refactor preview) HOT 10
- Sticky Scroll Editor view is broken HOT 1
- Debugging Dart web app (via webdev) downloads source code from instead of mapping back to local paths HOT 4
- Running web app triggers "Which DevTools page?" prompt
- flutter excpetions not logs in debug console on vscode HOT 8
- Debugging a Dart web app may result in errors displayed in the console HOT 7
- "dart.env" settings do not respect VSCode Built-In Variables HOT 1
- Close Embedded Widget Inspector Window on Debug Session End
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 dart-code.