Skip to content

Eliminate relative imports where possible and workaround inheritance problem in reexported classes #1675

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

Merged
merged 5 commits into from
Apr 19, 2018

Conversation

jcollins-g
Copy link
Contributor

@jcollins-g jcollins-g commented Apr 18, 2018

Relative imports when mixed with absolute imports can produce inconsistent analysis results, confusing Dartdoc and its tests. Fix dartdoc's own use of imports internally to prevent this from being a possible issue.

Also add a workaround for dart-lang/sdk#32923, making sure that we calculate inheritance using the defining library.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label Apr 18, 2018
@jcollins-g jcollins-g changed the title Eliminate relative imports where possible (and not in test package) Eliminate relative imports where possible and workaround inheritance problem in reexported classes Apr 18, 2018
@jcollins-g jcollins-g requested review from devoncarew and pq April 18, 2018 22:50
Copy link
Member

@pq pq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 % a sorting nit.

lib/dartdoc.dart Outdated
export 'src/generator.dart';
export 'src/model.dart';
export 'src/package_meta.dart';
import 'package:dartdoc/src/config.dart';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider re-ordering alphabetically?

FWIW IDEA makes this a snap w/ the "Optimize Imports..." action.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jcollins-g jcollins-g merged commit 0b6a9c9 into master Apr 19, 2018
@jcollins-g jcollins-g deleted the fix-imports branch April 19, 2018 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants