Sdk: Analyzer: Core libraries sometimes seem "double" imported...

Created on 7 Dec 2016  路  8Comments  路  Source: dart-lang/sdk

Resulting in errors like:

ERROR: Element 'List' from SDK library 'core.dart' is implicitly hidden by 'core.dart'.

It's not cleanly reproducible but it does happen from time to time.

P2 area-analyzer type-bug

All 8 comments

I can confirm seeing this today. I never encountered this before the latest update. I'm running Dart VM version: 1.21.0-dev.11.3 on "linux_x64".

Reloading the editor (VS Code) made this go away.

Ping, it looks like this occurring a lot more than I thought:

https://github.com/dart-lang/sdk/issues/14158#issuecomment-269394969

/cc @patkujawa-wf

When the analyzer gets into this state for me it's no longer giving me other useful errors, just these bogus ones.

I have the same one:

ERROR: Element 'String' from SDK library 'core.dart' is implicitly hidden by 'core.dart'. ([mobiad_rest_ui_mdl_mmui_media_sample] web/main.dart:547)

capturfiles-20170130_012631

I'm getting this too.

Element 'print' from SDK library 'core.dart' is implicitly hidden by 'core.dart'

I've got the same error. I could solve it by commenting an import out (once 'dart:io' and the other time 'dart:async'). I believe, it was not necessary wich one I've choose. I think by changing the an import, the analyzer refreshed the whole file. My SDK Version was 1.22.1 (actual sdk in stable channel).
Element 'String' from SDK library 'core.dart' is implicitly hidden by 'core.dart'

I rely on the analyzer as it's used in PyCharm (likely the same for all JetBrains IDEs), and I've found that cutting and pasting the line that the error points to causes the analyzer to re-evaluate and fix itself (maybe not every time, but I think quite often). However, it's often easier to just kill and restart the analyzer or restart pycharm.

I haven't seen this in ~6 months, so closing.

Was this page helpful?
0 / 5 - 0 ratings