Skip to content
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

Deprecate --resources-dir option. #3696

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 8.0.7-wip

* Deprecate the `--nodoc` option. (#3690)
* Deprecate the `--resources-dir` option. (#3696)

## 8.0.6

Expand Down
6 changes: 4 additions & 2 deletions lib/src/dartdoc_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1679,9 +1679,11 @@ List<DartdocOption> createDartdocOptions(
help:
'A list of package names to place first when grouping libraries in '
'packages. Unmentioned packages are placed after these.'),
// TODO(srawlins): Deprecate this option.
// Deprecated. Use of this option is reported.
// TODO(kallentu): Remove this option.
DartdocOptionArgOnly<String?>('resourcesDir', null, resourceProvider,
help: "An absolute path to dartdoc's resources directory.", hide: true),
help: "(deprecated) An absolute path to dartdoc's resources directory.",
hide: true),
DartdocOptionArgOnly<bool>('sdkDocs', false, resourceProvider,
help: 'Generate ONLY the docs for the Dart SDK.'),
DartdocOptionArgSynth<String?>('sdkDir',
Expand Down
7 changes: 7 additions & 0 deletions lib/src/generator/generator_frontend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ class GeneratorFrontEnd implements Generator {
'longer be supported.',
);
}
if (_generatorBackend.options.resourcesDir != null) {
packageGraph?.defaultPackage.warn(
PackageWarning.deprecated,
message: "The '--resources-dir' option is deprecated, and will soon be "
'removed.',
);
}

var indexElements = packageGraph == null
? const <Indexable>[]
Expand Down
Loading