-
Notifications
You must be signed in to change notification settings - Fork 125
refactor: begin extracting per-package data out from Package #1622
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
Conversation
Thanks for running on this, @jcollins-g ! |
pubspec.lock
Outdated
@@ -415,4 +415,4 @@ packages: | |||
source: hosted | |||
version: "2.1.13" | |||
sdks: | |||
dart: ">=2.0.0-dev <=2.0.0-dev.30.0" | |||
dart: ">=2.0.0-dev <=2.0.0-edge.0d5cf900b021bf5c9fa593ffa12b15bcd1cc5fe0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't know the consequences of committing this. I don't know how pub would know to compare two edge versions. If this is an issue, we should have a travis check here so that an edge constraint can't be committed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these cause zero issues. Just a bit weird to look at...
@@ -4497,12 +4508,12 @@ class Package extends Canonicalization with Nameable, Warnable { | |||
} | |||
} | |||
|
|||
class PackageCategory implements Comparable<PackageCategory> { | |||
class Package implements Comparable<Package> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
// Library objects serving as entry points for documentation. | ||
final List<Library> _libraries = []; | ||
|
||
class PackageGraph extends Canonicalization with Nameable, Warnable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I would call it a PackageGraph myself (PackageGroup
? Project
?), but whatever you're comfortable with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, this object will represent the collection of Packages and their cross-links via dependencies being documented. I admit that PackageGraph
is more ambition than reality at this point.
@jcollins-g – make sure you delete the |
er, don't delete it – but |
@jcollins-g – those were always generated, just into Update the |
Yep already was figuring that out. #1624 has the gitignore change. |
First part of #1610. In order to implement categories and other parameters on a per-package basis, rather than globally, Dartdoc needs a data structure that is truly per-package. The Package class has long had a TODO for a major refactor and at least some parts of that really can't be avoided now without significantly adding to technical debt.
In this first PR, only libraries are made per-package and the bare minimum of initialization and referencing has been moved over -- most objects still are talking to
PackageGraph
when they are going to referencePackage
in the future.