FAQ
Reviewers: golang-dev1,

Message:
Hello [email protected],

I'd like you to review this change to
https://code.google.com/p/go/


Description:
cmd/go: add 'oracle' to list of tools.

(Oracle itself is in CL 9502043.)

Please review this at https://codereview.appspot.com/12869048/

Affected files:
    M src/cmd/go/pkg.go
    M src/cmd/go/tool.go


Index: src/cmd/go/pkg.go
===================================================================
--- a/src/cmd/go/pkg.go
+++ b/src/cmd/go/pkg.go
@@ -301,13 +301,14 @@

   // goTools is a map of Go program import path to install target directory.
   var goTools = map[string]targetDir{
- "cmd/api": toTool,
- "cmd/cgo": toTool,
- "cmd/fix": toTool,
- "cmd/yacc": toTool,
- "code.google.com/p/go.tools/cmd/cover": toTool,
- "code.google.com/p/go.tools/cmd/godoc": toBin,
- "code.google.com/p/go.tools/cmd/vet": toTool,
+ "cmd/api": toTool,
+ "cmd/cgo": toTool,
+ "cmd/fix": toTool,
+ "cmd/yacc": toTool,
+ "code.google.com/p/go.tools/cmd/cover": toTool,
+ "code.google.com/p/go.tools/cmd/godoc": toBin,
+ "code.google.com/p/go.tools/cmd/oracle": toTool,
+ "code.google.com/p/go.tools/cmd/vet": toTool,
   }

   // expandScanner expands a scanner.List error into all the errors in the
list.
Index: src/cmd/go/tool.go
===================================================================
--- a/src/cmd/go/tool.go
+++ b/src/cmd/go/tool.go
@@ -65,7 +65,7 @@

   func isInGoToolsRepo(toolName string) bool {
    switch toolName {
- case "cover", "vet":
+ case "cover", "vet", "oracle":
     return true
    }
    return false


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Adonovan at Aug 22, 2013 at 5:59 pm
    Hello [email protected], [email protected] (cc: [email protected]),

    Please take another look.


    https://codereview.appspot.com/12869048/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rob Pike at Aug 22, 2013 at 9:54 pm
    What is the oracle? What does it do? It's not even checked in yet.

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Alan Donovan at Aug 22, 2013 at 10:29 pm

    On 22 August 2013 17:53, Rob Pike wrote:

    What is the oracle? What does it do? It's not even checked in yet.
    Its code is in pending CL 9502043, currently in review. It is an oracle
    that answers questions about your Go program: given a source code position
    (e.g. an expression selected in your editor buffer) and a query (e.g.
    "describe") it will analyze your program and print the answer, often in the
    form of cross-references to other parts of the program. The user's editor
    (currently Emacs, others to follow) invokes it via "go tool oracle".

    I haven't written a manual for it yet but obviously that's high on my list.
      I would like to get some feedback from early adopters soon.

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Andrew Gerrand at Aug 23, 2013 at 12:09 am
    Since this isn't really a command-line tool I'm not sure it's worth making
    it accessible through the go tool.

    I'd prefer to keep the number of special-cased tools to a minimum. vet,
    godoc, and cover are special for various reasons.

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rob Pike at Aug 23, 2013 at 12:22 am
    I tend to agree. It may move to 'tool' status at some point but we
    need to see it in action, and have it more generally useful (that is,
    not just an emacs plugin), before making that decision.

    For the record: All it takes for a local installation to have 'go tool
    oracle' work is to copy the binary to the tool directory. The 'go
    tool' command is just a shorthand for running a binary from that
    directory.

    That solution seems workable and sufficiently non-committal for the moment.

    -rob

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Alan Donovan at Aug 26, 2013 at 9:18 pm

    adg wrote:
    Since this isn't really a command-line tool I'm not sure it's worth
    making it accessible through the go tool.
    On 22 August 2013 20:21, Rob Pike wrote:

    I tend to agree. It may move to 'tool' status at some point but we
    need to see it in action, and have it more generally useful (that is,
    not just an emacs plugin), before making that decision.

    For the record: All it takes for a local installation to have 'go tool
    oracle' work is to copy the binary to the tool directory. The 'go
    tool' command is just a shorthand for running a binary from that
    directory.

    That solution seems workable and sufficiently non-committal for the moment.
    I've reverted this CL for now, but I should point out that the alternative
    is significantly more fiddly. Even though the user is not expected to run
    the oracle tool directly, the benefit of being a 'go tool' subcommand is
    that both installation and invocation of the oracle have one and only one
    configuration requirement: that there be a command called 'go'. (In my
    setup, for example, 'go' is a wrapper that selects the appropriate GOROOT
    and GOPATH---each of which I have several---based on the working directory,
    then dispatches to the real 'go' tool binary.)

    So expect this CL to reappear when the oracle is more mature. :)

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Adonovan at Aug 26, 2013 at 6:51 pm
    *** Abandoned ***

    https://codereview.appspot.com/12869048/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedAug 22, '13 at 5:58p
activeAug 26, '13 at 9:18p
posts8
users3
websitegolang.org

People

Translate

site design / logo © 2023 Grokbase