You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feedback on preview feature - Angular analyzer plugin integration #396
v2.3.4 includes a preview feature enabled with the dart.previewAnalyzeAngularTemplates setting. Because the plugin is still in development, in order to use this you will need to download the angular analyzer plugin and build it yourself (instructions can be found here). Note: You do not need to overwrite the analyzer.snapshot in your SDK because Dart Code supports custom analyzer snapshots; simply set the dart.analyzerPath setting (which can be done at the workspace level, along with dart.previewAnalyzeAngularTemplates to enable this only for some projects) to the full path of the analyzer.snapshot that is built.
This feature is behind a preview flag because it's currently incomplete (both the plugin and the Dart Code integration). Depending on how the plugin ships once complete, it may become enabled by default.
Thanks for adding the feedback issue and editor message!
Errors and completions are working on 2.3.5. The only thing I've noticed is that it seems angular template analysis doesn't work properly until the entire workspace has completed analysis, even if the html file is the focused file. I'm guessing this is some artifact of how the plugin works.
Hmm, strange. We should be sending the html files as priority files - you could confirm this by setting dart.analyzerLogFile (see CONTRIBUTING) and reviewing the log (I checked the code and it does seem that HTML is consistent analyzable, which is what's required for a priority file).
If it's not being sent as a priority file, that's a bug in Dart Code. If it is, then probably this is the plugin or analyzer.
I'm sure I had a bug where files weren't set as priority if they were open during project reload, but then I couldn't repro it when I investigated - see #354. If it looks like that and you can reliably repro, please let me know!
I believe this is actually a result of the plugin not activating when opening an HTML file. I've created #399 - but I can't find a way to change the activation events based on the configuration.
@LorenVS we do analyze html templates last. Mostly because dart files point to html files and not the other way around. So autocompletion won't work and errors/navigation will take a while, but once dart has finished analyzing it should act normal.
I've been using this pretty regularly over the last few months, and haven't run into any significant issues. I'm fine with just moving it to a normal option
I re-checked the changes here and realise the changes were actually just about invoking the providers for HTML.
So I guess a more appropriate question is, if we drop the preview suffix, how dangerous would it be to default this option to true so everyone just gets it by default? Have Angular/SDK both shipped (to stable) all the pieces required to get people using it? (If it requires a specific SDK/analysis server version, we can check for that).
FYI - in the next version I plan to drop the "preview" from the setting name but also default it to on (after testing which versions of SDK it works fine with). Doing this in #458.
If you think this isn't a good idea let, please let me know. That version is probably around a week away, depending on how testing of the multi-root changes go.
In fact it seems like it's working. I get warnings when a field doesn't exist inside a template.
But there's no syntax coloration if I write my template directly in a string inside the Component decorator. Which made me think it wasn't working.
Test: Messed up dashboard_component.html by changing {{hero.name}} to {{herozz.name}}.
ID3 will parse the template html, but no errors are returned.
[18:11:01]: Spawning C:\Program Files\dart-sdk\bin\dart.exe with args ["C:\\Program Files\\dart-sdk\\bin\\snapshots\\analysis_server.dart.snapshot","--client-id=Dart-Code.dart-code","--client-version=2.10.0"]
[18:11:01]: ==> {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]}}
[18:11:01]: ==> {"id":"2","method":"analysis.setAnalysisRoots","params":{"excluded":[],"included":["c:\\Setup\\Dart\\toh-6-5-dev"]}}
[18:11:01]: ==> {"id":"3","method":"analysis.updateContent","params":{"files":{"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html":{"content":"<h3>Top Heroes</h3>\n<div class=\"grid grid-pad\">\n <a *ngFor=\"let hero of heroes\" routerLink=\"/detail/{{hero.id}}\" class=\"col-1-4\">\n <div class=\"module hero\">\n <h4>{{herozz.name}}</h4>\n </div>\n </a>\n</div>\n<hero-search></hero-search>\n","type":"add"}}}}
[18:11:01]: ==> {"id":"4","method":"edit.getAssists","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html","length":0,"offset":179}}
[18:11:01]: ==> {"id":"5","method":"edit.getFixes","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html","offset":179}}
[18:11:01]: ==> {"id":"6","method":"edit.getAssists","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html","length":0,"offset":179}}
[18:11:02]: <== {"event":"server.connected","params":{"version":"1.20.0","pid":9104,"sessionId":""}}
[18:11:02]: ==> {"id":"7","method":"analysis.updateContent","params":{"files":{"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html":{"edits":[{"offset":0,"length":0,"replacement":"","id":""}],"type":"change"}}}}
[18:11:02]: ==> {"id":"8","method":"analysis.setPriorityFiles","params":{"files":["c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html"]}}
[18:11:02]: ==> {"id":"9","method":"analysis.setSubscriptions","params":{"subscriptions":{"CLOSING_LABELS":["c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html"],"OCCURRENCES":["c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html"],"OUTLINE":["c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html"]}}}
[18:11:02]: <== {"id":"1"}
[18:11:02]: <== {"event":"server.status","params":{"pub":{"isListingPackageDirs":true}}}
[18:11:02]: <== {"event":"server.status","params":{"pub":{"isListingPackageDirs":false}}}
[18:11:03]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\analysis_options.yaml","errors":[]}}
[18:11:03]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\pubspec.yaml","errors":[]}}
[18:11:03]: <== {"id":"2"}
[18:11:03]: <== {"id":"3","result":{}}
[18:11:03]: <== {"id":"7","result":{}}
[18:11:03]: <== {"id":"8"}
[18:11:03]: <== {"id":"9"}
[18:11:03]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[18:11:03]: <== {"id":"4","result":{"assists":[]}}
[18:11:03]: <== {"id":"5","result":{"fixes":[]}}
[18:11:03]: <== {"id":"6","result":{"assists":[]}}
[18:11:04]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\app_component.dart","errors":[]}}
[18:11:04]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","offset":2179,"length":4,"startLine":66,"startColumn":25},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","offset":1472,"length":4,"startLine":47,"startColumn":20},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","offset":1689,"length":4,"startLine":53,"startColumn":45},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false}]}}
[18:11:04]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\app_routes.dart","errors":[]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.dart","errors":[]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero.dart","errors":[]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\heroes_component.dart","errors":[]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_detail_component.dart","errors":[]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_component.dart","errors":[]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_service.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_service.dart","offset":567,"length":4,"startLine":26,"startColumn":42},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false}]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","offset":1538,"length":4,"startLine":60,"startColumn":57},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","offset":689,"length":4,"startLine":30,"startColumn":42},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","offset":1220,"length":4,"startLine":49,"startColumn":36},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false}]}}
[18:11:05]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\web\\main.dart","errors":[]}}
[18:11:05]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[18:11:06]: ==> {"id":"10","method":"analysis.getHover","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html","offset":99}}
[18:11:06]: <== {"id":"10","result":{"hovers":[]}}
[18:11:08]: ==> {"id":"11","method":"analysis.getHover","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html","offset":175}}
[18:11:08]: <== {"id":"11","result":{"hovers":[]}}
[18:11:12]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\date_symbol_data_custom.dart","errors":[]}}
[18:11:12]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl_helpers.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_service.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_service.dart","offset":567,"length":4,"startLine":26,"startColumn":42},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false}]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\date_symbol_data_local.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\exceptions.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_detail_component.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\rule\\rule.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\rule\\metadata.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\heroes_component.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","offset":2179,"length":4,"startLine":66,"startColumn":25},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","offset":1472,"length":4,"startLine":47,"startColumn":20},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\in_memory_data_service.dart","offset":1689,"length":4,"startLine":53,"startColumn":45},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false}]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\number_symbols.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\intl_browser.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\number_format.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\argument_list_visitor.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\line_writer.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\dart_formatter.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\intl_standalone.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\chunk.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\nesting_builder.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\app_component.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\dart_style.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\date_format_helpers.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\message_lookup_by_library.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\number_symbols_data.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\rule\\combinator.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\intl.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\compact_number_format.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\bidi_utils.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\error_listener.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\call_chain_visitor.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","errors":[{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","offset":1538,"length":4,"startLine":60,"startColumn":57},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","offset":689,"length":4,"startLine":30,"startColumn":42},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false},{"severity":"INFO","type":"HINT","location":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_service.dart","offset":1220,"length":4,"startLine":49,"startColumn":36},"message":"'JSON' is deprecated and shouldn't be used.","correction":"Try replacing the use of the deprecated member with the replacement.","code":"deprecated_member_use","hasFix":false}]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\line_splitting\\line_splitter.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_component.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\whitespace.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\source_code.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\debug.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\data\\dates\\locale_list.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\line_splitting\\solve_state_queue.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\chunk_builder.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\date_format.dart","errors":[]}}
[18:11:13]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\web\\main.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\date_time_patterns.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\formatter_options.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\fast_hash.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\date_format_internal.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\string_compare.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\date_symbols.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\file_data_reader.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\nesting_level.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\lazy_locale_data.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\bidi_formatter.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\plural_rules.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\intl\\date_format_field.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\line_splitting\\solve_state.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\rule\\type_argument.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\source_visitor.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\date_symbol_data_http_request.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\line_splitting\\rule_set.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\app_routes.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\rule\\argument.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\date_symbol_data_file.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\intl\\lib\\src\\http_request_data_reader.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\.dart_tool\\pub\\deps\\debug\\dart_style\\lib\\src\\io.dart","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\web\\index.html","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\heroes_component.html","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\dashboard_component.html","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_search_component.html","errors":[]}}
[18:11:14]: <== {"event":"analysis.errors","params":{"file":"c:\\Setup\\Dart\\toh-6-5-dev\\lib\\src\\hero_detail_component.html","errors":[]}}
Thanks for your fast reply! Yea, that was my first guess after reading the logs that I should submit the bug report to analyzis server plugin devs, too.
FYI - the next version of Dart Code is flipping this flag to on by default (and renaming to drop preview) - see #458. Note: it'll only activate if your SDK has analysis server version >= 1.18.5 (this was not previously the case) though I presume everyone using this plugin must be using a recent dev build anyway.
There will likely be a beta release before it goes out, so any testing it can be given would be appreciated (probably it'll be end of next week or early the next).
Activity
Tweaks to angular analyzer preview.
LorenVS commentedon Jul 31, 2017
Thanks for adding the feedback issue and editor message!
Errors and completions are working on 2.3.5. The only thing I've noticed is that it seems angular template analysis doesn't work properly until the entire workspace has completed analysis, even if the html file is the focused file. I'm guessing this is some artifact of how the plugin works.
@MichaelRFairhurst Do you have any insight into this?
DanTup commentedon Jul 31, 2017
Hmm, strange. We should be sending the html files as priority files - you could confirm this by setting
dart.analyzerLogFile(see CONTRIBUTING) and reviewing the log (I checked the code and it does seem that HTML is consistent analyzable, which is what's required for a priority file).If it's not being sent as a priority file, that's a bug in Dart Code. If it is, then probably this is the plugin or analyzer.
I'm sure I had a bug where files weren't set as priority if they were open during project reload, but then I couldn't repro it when I investigated - see #354. If it looks like that and you can reliably repro, please let me know!
LorenVS commentedon Jul 31, 2017
I believe this is actually a result of the plugin not activating when opening an HTML file. I've created #399 - but I can't find a way to change the activation events based on the configuration.
MichaelRFairhurst commentedon Jul 31, 2017
@LorenVS we do analyze html templates last. Mostly because dart files point to html files and not the other way around. So autocompletion won't work and errors/navigation will take a while, but once dart has finished analyzing it should act normal.
DanTup commentedon Nov 23, 2017
Has anything changed with the Angular plugin - is this preview still required?
LorenVS commentedon Nov 24, 2017
I've been using this pretty regularly over the last few months, and haven't run into any significant issues. I'm fine with just moving it to a normal option
DanTup commentedon Nov 25, 2017
I re-checked the changes here and realise the changes were actually just about invoking the providers for HTML.
So I guess a more appropriate question is, if we drop the
previewsuffix, how dangerous would it be to default this option to true so everyone just gets it by default? Have Angular/SDK both shipped (to stable) all the pieces required to get people using it? (If it requires a specific SDK/analysis server version, we can check for that).DanTup commentedon Nov 26, 2017
FYI - in the next version I plan to drop the "preview" from the setting name but also default it to on (after testing which versions of SDK it works fine with). Doing this in #458.
If you think this isn't a good idea let, please let me know. That version is probably around a week away, depending on how testing of the multi-root changes go.
rrousselGit commentedon Feb 15, 2018
Is it supposed to work out of the box if
is present in the analysis_options.yaml ?
I'm new to angulardart. And on my vscode, templates are interpreted are just plain strings.
DanTup commentedon Feb 15, 2018
@rrousselGit For now, you also need to add
"dart. previewAnalyzeAngularTemplates": trueto your Code settings.rrousselGit commentedon Feb 16, 2018
I had it enabled already.
In fact it seems like it's working. I get warnings when a field doesn't exist inside a template.
But there's no syntax coloration if I write my template directly in a string inside the Component decorator. Which made me think it wasn't working.
DanTup commentedon Feb 16, 2018
Oh, I see. I think for that too work (assuming the plugin supports it) we need this:
microsoft/vscode#585
Please click the 👍 on the first comment there!
nekrondev commentedon Mar 21, 2018
I am unable to see template errors even if installed as suggested. Maybe this is a dart SDK failure and has nothing to do with DartVS plugin?
VSCode:
Dart VM version: 2.0.0-dev.39.0 (Fri Mar 16 00:17:07 2018 +0100) on "windows_x64"
Dart Code 2.10.0 installed from VSCode Marketplace
Testbed: TOH-6-5-dev (https://github.com/angular-examples/toh-6/tree/5-dev)
modified analysis_options.yaml:
VScode user settings:
Test: Messed up dashboard_component.html by changing {{hero.name}} to {{herozz.name}}.
ID3 will parse the template html, but no errors are returned.
DanTup commentedon Mar 21, 2018
Thanks for the detailed report! The logs show that we are are sending the contents of the HTML, but the analyzer says no errors:
I think this may be best raised at https://github.com/dart-lang/angular_analyzer_plugin since I don't think there's much I can do to troubleshoot past asking you to do what you're already done.
DanTup commentedon Mar 21, 2018
I see you beat me to it 👍
nekrondev commentedon Mar 21, 2018
Thanks for your fast reply! Yea, that was my first guess after reading the logs that I should submit the bug report to analyzis server plugin devs, too.
DanTup commentedon Mar 29, 2018
FYI - the next version of Dart Code is flipping this flag to on by default (and renaming to drop
preview) - see #458. Note: it'll only activate if your SDK has analysis server version >= 1.18.5 (this was not previously the case) though I presume everyone using this plugin must be using a recent dev build anyway.There will likely be a beta release before it goes out, so any testing it can be given would be appreciated (probably it'll be end of next week or early the next).
DanTup commentedon Apr 17, 2018
This flag was flipped and is available in a beta of v2.12 here:
https://github.com/Dart-Code/Dart-Code/releases/tag/v2.12.0-beta.1
Provisional release notes here:
https://dartcode.org/releases/v2-12/
Please test it out and let me know if you have any issues.