Skip to content

Commit 7b44916

Browse files
committed
Add depcated alias for -skip-packages option
1 parent 82ad2eb commit 7b44916

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scala3doc/src/dotty/dokka/Scala3docArgs.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,18 @@ class Scala3docArgs extends SettingGroup with CommonScalaSettings:
3939
"Mapping between regexes matching classpath entries and external documentation. " +
4040
"'regex::[scaladoc|scala3doc|javadoc]::path' syntax is used")
4141

42+
val deprecatedSkipPackages: Setting[List[String]] =
43+
MultiStringSetting("-skip-packages", "packages", "Deprecated, please use `-skip-by-id` or `-skip-by-regex`")
44+
4245
val skipById: Setting[List[String]] =
4346
MultiStringSetting("-skip-by-id", "package or class identifier", "Identifiers of packages or top-level classes to skip when generating documentation")
4447

4548
val skipByRegex: Setting[List[String]] =
4649
MultiStringSetting("-skip-by-regex", "regex", "Regexes that match fully qualified names of packages or top-level classes to skip when generating documentation")
4750

51+
4852
def scala3docSpecificSettings: Set[Setting[_]] =
49-
Set(sourceLinks, syntax, revision, externalDocumentationMappings, skipById, skipByRegex)
53+
Set(sourceLinks, syntax, revision, externalDocumentationMappings, skipById, skipByRegex, deprecatedSkipPackages)
5054

5155
object Scala3docArgs:
5256
def extract(args: List[String], rootCtx: CompilerContext):(Scala3doc.Args, CompilerContext) =
@@ -118,6 +122,8 @@ object Scala3docArgs:
118122
report.inform(
119123
s"Generating documenation $printableProjectName in $destFile")
120124

125+
if deprecatedSkipPackages.get.nonEmpty then report.warning(deprecatedSkipPackages.description)
126+
121127
val docArgs = Args(
122128
projectName.withDefault("root"),
123129
dirs,
@@ -131,7 +137,7 @@ object Scala3docArgs:
131137
sourceLinks.get,
132138
revision.nonDefault,
133139
externalMappings,
134-
skipById.get,
140+
skipById.get ++ deprecatedSkipPackages.get,
135141
skipByRegex.get,
136142
)
137143
(docArgs, newContext)

0 commit comments

Comments
 (0)