{"issue":{"state":"open","created_at":"2011-11-22T07:27:25Z","updated_at":"2011-11-23T05:14:49Z","user":{"gravatar_id":"8f41595db400be30176f6f04630c2842","id":184683,"url":"https://api.github.com/users/eed3si9n","login":"eed3si9n","avatar_url":"https://secure.gravatar.com/avatar/8f41595db400be30176f6f04630c2842?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":5,"body":"## overview\r\nThis is a slightly cleaned up version of [sbt-inspectr][1].\r\nWhen `inspect tree <key>` is called, `SettingGraph` case class is created recursively\r\nalong the dependencies, calling the similar code as `inspect` command's `Project.details`.\r\n`SettingGraph` extends `Graph` trait, which is able to render itself as an ascii tree.\r\n\r\n  [1]: https://github.com/eed3si9n/sbt-inspectr\r\n\r\n## sample usage\r\n\r\n```\r\n> inspect \r\nDisplay all 217 possibilities? (y or n) \r\n> inspect tree pa\r\npackage                 package-bin             package-configuration\r\npackage-doc             package-options         package-src\r\npackaged-artifact       packaged-artifacts      parallel-execution\r\n> inspect tree package\r\n[info] compile:package = Task[java.io.File]\r\n[info]   +-compile:package-bin = Task[java.io.File]\r\n[info]     +-compile:package-configuration(for package-bin) = Task[sbt.Packag..\r\n[info]     | +-compile:mappings(for package-bin) = Task[scala.collection.Seq[..\r\n[info]     | | +-compile:products = Task[scala.collection.Seq[java.io.File]]\r\n[info]     | | \r\n[info]     | +-compile:artifact-path(for package-bin) = target/scala-2.9.1/he..\r\n[info]     | | +-*:cross-target = target/scala-2.9.1\r\n[info]     | | +-compile:artifact(for package-bin) = Artifact(helloworld,jar,..\r\n[info]     | | | +-*/*:artifact-classifier = None\r\n[info]     | | | +-compile:configuration = compile\r\n[info]     | | | \r\n[info]     | | +-*/*:scala-version = 2.9.1\r\n[info]     | | +-*:project-id = production:helloworld:0.1-SNAPSHOT\r\n[info]     | | +-*/*:artifact-name = <function3>\r\n[info]     | | \r\n[info]     | +-compile:package-options(for package-bin) = Task[scala.collecti..\r\n[info]     |   +-*:organization = production\r\n[info]     |   +-*:name = helloworld\r\n[info]     |   +-compile:main-class = Task[scala.Option[java.lang.String]]\r\n[info]     |   +-*/*:version = 0.1-SNAPSHOT\r\n[info]     |   +-*/*:homepage = None\r\n[info]     |   +-*:organization-name = production\r\n[info]     |   +-*/*:package-options = Task[scala.collection.Seq[sbt.PackageO..\r\n[info]     |   \r\n[info]     +-compile:cache-directory(for package-bin) = target/scala-2.9.1/ca..\r\n[info]     +-compile:streams(for package-bin) = Task[sbt.std.TaskStreams[sbt...\r\n[info]       +-*/*:streams-manager = Task[sbt.std.Streams[sbt.Init$ScopedKey[..\r\n[info]       \r\n> inspect package\r\n[info] Task: java.io.File\r\n[info] Description:\r\n[info] \tProduces the main artifact, such as a binary jar.  This is typically an alias for the task that actually does the packaging.\r\n[info] Provided by:\r\n[info] \t{file:/Users/eed3si9n/work/helloworld/}default-b65acd/compile:package\r\n[info] Dependencies:\r\n[info] \tcompile:package-bin\r\n[info] Delegates:\r\n[info] \tcompile:package\r\n[info] \t*:package\r\n[info] \t{.}/compile:package\r\n[info] \t{.}/*:package\r\n[info] \t*/compile:package\r\n[info] \t*/*:package\r\n[info] Related:\r\n[info] \ttest:package\r\n> inspect actual package\r\n[info] Task: java.io.File\r\n[info] Description:\r\n[info] \tProduces the main artifact, such as a binary jar.  This is typically an alias for the task that actually does the packaging.\r\n[info] Provided by:\r\n[info] \t{file:/Users/eed3si9n/work/helloworld/}default-b65acd/compile:package\r\n[info] Dependencies:\r\n[info] \tcompile:package-bin\r\n[info] Delegates:\r\n[info] \tcompile:package\r\n[info] \t*:package\r\n[info] \t{.}/compile:package\r\n[info] \t{.}/*:package\r\n[info] \t*/compile:package\r\n[info] \t*/*:package\r\n[info] Related:\r\n[info] \ttest:package\r\n> help inspect\r\n\r\ninspect [tree] <key>\r\n\r\n\tFor a plain setting, the value bound to the key argument is displayed using its toString method.\r\n\tOtherwise, the type of task (\"Task\" or \"Input task\") is displayed.\r\n\t\r\n\t\"Dependencies\" shows the settings that this setting depends on.\r\n\tIf 'tree' is specified, the bound value as well as the settings that this setting depends on\r\n\t(and their bound values) are displayed as a tree structure.\r\n\t\r\n\t\"Reverse dependencies\" shows the settings that depend on this setting.\r\n\r\n\tWhen a key is resolved to a value, it may not actually be defined in the requested scope.\r\n\tIn this case, there is a defined search sequence.\r\n\t\"Delegates\" shows the scopes that are searched for the key.\r\n\t\"Provided by\" shows the scope that contained the value returned for the key.\r\n\r\n\t\"Related\" shows all of the scopes in which the key is defined.\r\n\r\n\r\n> \r\n```","assignee":null,"number":274,"id":2315233,"labels":[],"pull_request":{"patch_url":"https://github.com/harrah/xsbt/pull/274.patch","html_url":"https://github.com/harrah/xsbt/pull/274","diff_url":"https://github.com/harrah/xsbt/pull/274.diff"},"title":"\"inspect tree <key>\" command","closed_at":null,"html_url":"https://github.com/harrah/xsbt/issues/274","milestone":null,"url":"https://api.github.com/repos/harrah/xsbt/issues/274"},"action":"created","comment":{"created_at":"2011-11-23T05:14:49Z","updated_at":"2011-11-23T05:14:49Z","user":{"gravatar_id":"8f41595db400be30176f6f04630c2842","id":184683,"url":"https://api.github.com/users/eed3si9n","login":"eed3si9n","avatar_url":"https://secure.gravatar.com/avatar/8f41595db400be30176f6f04630c2842?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Are public signatures considered an API or it's ok to change them?\r\nI am thinking about changing:\r\n\r\n```scala\r\ndef details(structure: BuildStructure, actual: Boolean, scope: Scope, key: AttributeKey[_])(implicit display: Show[ScopedKey[_]]): String\r\n```\r\n\r\nto \r\n\r\n```scala\r\ndef details(extracted: Extracted, actual: Boolean, scope: Scope, key: AttributeKey[_])(implicit display: Show[ScopedKey[_]]): String\r\n```\r\n\r\nsince `Extracted` seems like the best place to hang the key manifest extraction.\r\n","id":2845134,"url":"https://api.github.com/repos/harrah/xsbt/issues/comments/2845134"}}