Description
I attempted to revive #1507 and got it mostly working. However, it currently causes dartdoc to generate an error that is too low priority to be worth the time investigating further at the moment. To recap where I got:
Enabling strong mode results in this new warning from Flutter:
new: dartdoc:stdout: Validating docs...
new: dartdoc:stderr: warning: dartdoc generated a broken link to: package-collection_collection/CombinedMapView/operator_put.html
new: dartdoc:stderr: to element collection.CombinedMapView.[]=: (file:///usr/local/google/home/jcollins/dart/flutter/bin/cache/pkg/sky_engine/lib/collection/maps.dart:159:17)
new: dartdoc:stderr: linked to from collection.CombinedMapView: (file:///usr/local/google/home/jcollins/.pub-cache/hosted/pub.dartlang.org/collection-1.14.3/lib/src/combined_wrappers/combined_map.dart:20:7)
Debugging this shows that the inheritance manager for the CombinedMapView
's superclass UnmodifiableBase
fails to generate a MultiplyInheritedExecutableElement
for the operator and gives the wrong element to dartdoc, causing dartdoc to generate the bad link. We need to get the element for _UnmodifiableMapMixin's version of the operator to link correctly. It's possible for this sort of thing to be invisible in other situations (where it happens to generate a link to a documented file), and I expect that to be the common case. So until there's time to dig in here, I think strong mode should be avoided in dartdoc. I'll see about adding an assert to catch this problem.
Screenshot of debugger when things are working (strongMode = false):
Screenshot of debugger when things are not working (strongMode = true):