New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dartium should warn if checked mode is turned off #11633
Comments
I am not sure making checked mode the default for running dart code in dartium is the optimal setting. The editor which is a development platform does turn on checked mode by default and I can see that once we have better chrome developer tools integration for Dart, it would make sense to turn it on by default when running code using the developer tools. People also use dartium for running benchmarks and for comparing their application against pure javascript implementations, in these case having checked mode on by default would be surprising as the performance with checked mode turned on is not the same as that without it. |
This comment was originally written by davidm...@google.com I didn't say default, I said warn :) People who are running benchmarks will appreciated being warned that checks are on, so perhaps Dartium should just always show whether it's running with checked mode enabled. Thanks. |
What kind of warning do you suggest? A message to the dev tools console? Added this to the M7 milestone. |
This comment was originally written by davidm...@google.com That might do it, it would certainly be a start and it would be unobtrusive. Sounds good to me. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Issue #23390 has been merged into this issue. |
I actually advocate switching the default to be checked mode. In my experience, Dartium is now primarily used as a development tool. Would be interesting to have data that shows otherwise... I repeat the reasoning from issue #23390 here so it isn't lost.
Expected: A type error! Several times, developers on my team have been missing issues due to not running Dartium in checked mode. This is aggravated by the fact that you can't easily see if Dartium is indeed in checked mode. Please make checked mode the default, since Dartium is now first and foremost a development browser. |
+1 to making checked more the default. cc @a-siva. |
This comment was originally written by davidm...@google.com In the meantime I suggest every project does this on startup: if (inVm && !inCheckedMode) Window.alert('hey, turn on checked mode!'); Implementing "inVm" and "inCheckedMode" is left to the reader ;) |
Vijay and Terry, I think we can make checked mode the default for Dartium now, agree? |
Sounds good to me. I think this can be hardcoded in DartController.cpp. |
This comment was originally written by rms...@rossis.red Please provide a way for us to turn checked mode off with a flag or setting of some sort, for performance reasons. |
@#15, can you say more about your perf concerns? Dartium is not intended for deployment. |
This comment was originally written by rms...@rossis.red We use Dartium for our internal tool (not deployed externally) - we presented the 60fps talk at the Summit :) I'm worried about the impact of checked mode on us, but I don't mind it being the default and having a flag that I toggle off somewhere. |
Will not fix. |
This issue was originally filed by davidm...@google.com
Accidentally running Dartium with checked mode off can lead to lots of confusion and lost time if you're expecting type checks.
Please consider adding a warning on startup.
The text was updated successfully, but these errors were encountered: