Skip to content

Commit cec45fb

Browse files
authored
Deprecate --resources-dir option. (#3696)
* Deprecate --resources-dir option. * Add an entry to the changelog.
1 parent 40fef4c commit cec45fb

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 8.0.7-wip
22

33
* Deprecate the `--nodoc` option. (#3690)
4+
* Deprecate the `--resources-dir` option. (#3696)
45

56
## 8.0.6
67

lib/src/dartdoc_options.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -1679,9 +1679,11 @@ List<DartdocOption> createDartdocOptions(
16791679
help:
16801680
'A list of package names to place first when grouping libraries in '
16811681
'packages. Unmentioned packages are placed after these.'),
1682-
// TODO(srawlins): Deprecate this option.
1682+
// Deprecated. Use of this option is reported.
1683+
// TODO(kallentu): Remove this option.
16831684
DartdocOptionArgOnly<String?>('resourcesDir', null, resourceProvider,
1684-
help: "An absolute path to dartdoc's resources directory.", hide: true),
1685+
help: "(deprecated) An absolute path to dartdoc's resources directory.",
1686+
hide: true),
16851687
DartdocOptionArgOnly<bool>('sdkDocs', false, resourceProvider,
16861688
help: 'Generate ONLY the docs for the Dart SDK.'),
16871689
DartdocOptionArgSynth<String?>('sdkDir',

lib/src/generator/generator_frontend.dart

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ class GeneratorFrontEnd implements Generator {
2727
'longer be supported.',
2828
);
2929
}
30+
if (_generatorBackend.options.resourcesDir != null) {
31+
packageGraph?.defaultPackage.warn(
32+
PackageWarning.deprecated,
33+
message: "The '--resources-dir' option is deprecated, and will soon be "
34+
'removed.',
35+
);
36+
}
3037

3138
var indexElements = packageGraph == null
3239
? const <Indexable>[]

0 commit comments

Comments
 (0)