-
Notifications
You must be signed in to change notification settings - Fork 124
Document arbitrary SDK-like things as Dart SDKs. #1665
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
Document arbitrary SDK-like things as Dart SDKs. #1665
Conversation
…rtdoc tests for travis
…-passthrough+generator+sdkDir
…-passthrough+generator+sdkDir
…-passthrough+generator+sdkDir
…-passthrough+generator+sdkDir
…-passthrough+generator+sdkDir
Excited to have this feature, but letting @devoncarew give formal approval |
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.
Substantially, LGTM w/ a few wee nits.
bin/dartdoc.dart
Outdated
abbr: 'h', negatable: false, help: 'Show command help.'); | ||
parser.addFlag('hide-sdk-text', | ||
help: | ||
"Drop all text for SDK components. Helpful for integration tests for dartdoc, probably not useful for anything else.", |
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.
Single-quotes here too?
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.
There's a lint for that 😄
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.
@kevmoo Indeed, but there's apparently no way to automatically apply the lint resolution to all the lints that show up when I enable it, and doing Double-Click Alt-Enter Down-arrow Down-arrow Enter several hundred times does not sound like my idea of fun.
In the meantime I'll try not to make things worse. Done.
bin/dartdoc.dart
Outdated
parser.addOption('ambiguous-reexport-scorer-min-confidence', | ||
help: | ||
'Minimum scorer confidence to suppress warning on ambiguous reexport.', | ||
defaultsTo: "0.1", |
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.
Perhaps stick with single-quotes for consistency?
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.
done
help: 'Prints out progress JSON maps. One entry per line.', | ||
defaultsTo: false, | ||
negatable: true); | ||
'Group libraries from the same package in the libraries sidebar. (deprecated, ignored)', |
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.
=> (Deprecated, ignored)
?
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.
use-categories was marked deprecated, ignored back in #1641 because the meaning of "category" changed and we no longer require this flag to turn on what was category mode. Dartdoc now knows whether to do that by context and we just ignore this flag if it gets passed in.
The diff looks weird because I sorted the options here to better keep track of them visually, as I'm going to be doing major surgery on them soon.
@@ -151,5 +151,5 @@ void main() { | |||
dart_bear.allClasses.map((cls) => cls.name).contains('Bear'), isTrue); | |||
expect(p.packageMap["Dart"].publicLibraries, hasLength(3)); | |||
}); | |||
}, timeout: new Timeout.factor(4)); | |||
}, timeout: new Timeout.factor(8)); |
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.
Out of curiosity, did things get slower or were you seeing flakes before?
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.
Flakes.
Fixes #1617. Enabled by the config object refactoring that's ongoing, started in #1661 and #1662.
Dartdoc now allows you to specify a --sdk-dir as input. And it will automatically detect if the CWD or --input-dir is inside a built SDK or something that looks like it, like this subdirectory of the SDK repo and switch to SDK mode.
The flags allow you to document a package against a different version of the SDK than the one you're running dartdoc with, which could be useful on the pub site or for testing purposes. You can also document Windows SDKs from a Linux box, Mac SDKs from a Windows box, and so on.