From 348a28f761fdbec91a6007d1cd9e23284b82b169 Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Sun, 26 Apr 2015 02:31:51 +0100 Subject: [PATCH 1/2] Cleanup inspectDetailed. --- main/src/main/scala/sbt/CommandStrings.scala | 63 ++++++++++---------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/main/src/main/scala/sbt/CommandStrings.scala b/main/src/main/scala/sbt/CommandStrings.scala index 50858bdee..e67697184 100644 --- a/main/src/main/scala/sbt/CommandStrings.scala +++ b/main/src/main/scala/sbt/CommandStrings.scala @@ -95,39 +95,36 @@ $ShowCommand val InspectCommand = "inspect" val inspectBrief = (InspectCommand + " [uses|tree|definitions] ", "Prints the value for 'key', the defining scope, delegates, related definitions, and dependencies.") - val inspectDetailed = - InspectCommand + """ - - For a plain setting, the value bound to the key argument is displayed using its toString method. - Otherwise, the type of task ("Task" or "Input task") is displayed. - - "Dependencies" shows the settings that this setting depends on. - - "Reverse dependencies" shows the settings that depend on this setting. - - When a key is resolved to a value, it may not actually be defined in the requested scope. - In this case, there is a defined search sequence. - "Delegates" shows the scopes that are searched for the key. - "Provided by" shows the scope that contained the value returned for the key. - - "Related" shows all of the scopes in which the key is defined. - -""" + - InspectCommand + """ tree - - Displays `key` and its dependencies in a tree structure. - For settings, the value bound to the setting is displayed and for tasks, the type of the task is shown. - -""" + - InspectCommand + """ uses - - Displays the settings and tasks that directly depend on `key`. - -""" + - InspectCommand + """ definitions - - Displays the scopes in which `key` is defined. -""" + val inspectDetailed = s""" + |$InspectCommand + | + | For a plain setting, the value bound to the key argument is displayed using its toString method. + | Otherwise, the type of task ("Task" or "Input task") is displayed. + | + | "Dependencies" shows the settings that this setting depends on. + | + | "Reverse dependencies" shows the settings that depend on this setting. + | + | When a key is resolved to a value, it may not actually be defined in the requested scope. + | In this case, there is a defined search sequence. + | "Delegates" shows the scopes that are searched for the key. + | "Provided by" shows the scope that contained the value returned for the key. + | + | "Related" shows all of the scopes in which the key is defined. + | + |$InspectCommand tree + | + | Displays `key` and its dependencies in a tree structure. + | For settings, the value bound to the setting is displayed and for tasks, the type of the task is shown. + | + |$InspectCommand uses + | + | Displays the settings and tasks that directly depend on `key`. + | + |$InspectCommand definitions + | + | Displays the scopes in which `key` is defined. + """.stripMargin.trim val SetCommand = "set" val setBrief = (s"$SetCommand [every] ", "Evaluates a Setting and applies it to the current project.") From 1aff36d505c24a2801c21711bc859cbeeaaed50f Mon Sep 17 00:00:00 2001 From: Dale Wijnand Date: Sun, 26 Apr 2015 03:12:22 +0100 Subject: [PATCH 2/2] Add help message for `inspect actual`. Fixes #1651. --- main/src/main/scala/sbt/CommandStrings.scala | 6 ++++++ notes/0.13.9/help-inspect-actual.markdown | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 notes/0.13.9/help-inspect-actual.markdown diff --git a/main/src/main/scala/sbt/CommandStrings.scala b/main/src/main/scala/sbt/CommandStrings.scala index e67697184..cb21d3053 100644 --- a/main/src/main/scala/sbt/CommandStrings.scala +++ b/main/src/main/scala/sbt/CommandStrings.scala @@ -124,6 +124,12 @@ $ShowCommand |$InspectCommand definitions | | Displays the scopes in which `key` is defined. + | + |$InspectCommand actual + | + | Displays the actual dependencies used by `key`. + | This is useful because delegation means that a dependency can come from a scope other than the requested one. + | Using `inspect actual` will show exactly which scope is providing a value for a setting. """.stripMargin.trim val SetCommand = "set" diff --git a/notes/0.13.9/help-inspect-actual.markdown b/notes/0.13.9/help-inspect-actual.markdown new file mode 100644 index 000000000..fbfef8ebe --- /dev/null +++ b/notes/0.13.9/help-inspect-actual.markdown @@ -0,0 +1,12 @@ + + [@dwijnand]: http://github.com/dwijnand + [1651]: https://github.com/sbt/sbt/issues/1651 + [1990]: https://github.com/sbt/sbt/pull/1990 + +### Fixes with compatibility implications + +### Improvements + +- Add help message for `inspect actual`. [#1651][1651]/[#1990][1990] by [@dwijnand][@dwijnand] + +### Bug fixes