public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly
@ 2015-03-18 19:38 boger at us dot ibm.com
  2015-03-20 17:27 ` [Bug go/65462] " boger at us dot ibm.com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: boger at us dot ibm.com @ 2015-03-18 19:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

            Bug ID: 65462
           Summary: Use of 'go get' with gccgo is not finding dependencies
                    correctly
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: boger at us dot ibm.com
                CC: cmang at google dot com

When using the go tool provided with gccgo in gcc 5.0, the use of 'go get'
doesn't always find and build the dependent packages correctly.

Here is an example:

go get -u github.com/mitchellh/gox

There is a dependent package github.com/mitchellh/iochan but that never gets
downloaded or built and as a result neither does github.com/mitchellh/gox.  I
can make it work by downloading them in separate steps this way:

go get -u github.com/mitchellh/uchan
go get -u github.com/mitchellh/gox


After further debugging I found the problem has to do with the code in
libgo/go/cmd/go/pkg.go in the load function where it does this check:

....


  p1 := loadImport(path, p.Dir, stk, p.build.ImportPos[path])
  if !reqPkgSrc && p1.Root == "" {
    continue
  }

....


When it tries to load the github.com/mitchellh/uchan package, p1.Root == "" so
it skips the rest of the code in the loop that loads the package.  Isn't this a
case where p1.Root should have a non-null string and therefore not
continue/skip the rest of the body of the loop and get it loaded?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
@ 2015-03-20 17:27 ` boger at us dot ibm.com
  2015-03-20 20:42 ` boger at us dot ibm.com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: boger at us dot ibm.com @ 2015-03-20 17:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

--- Comment #1 from boger at us dot ibm.com ---
Created attachment 35077
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35077&action=edit
Fix dependencies in go tool for gccgo

The code to determine when to import packages was not quite catching the cases
it should.  It really needs to know what packages are part of the GO standard
packages and not try to load those -- if they aren't then they should be
loaded.

This makes a few changes to the previous:
- change the name of reqPkgSrc to reqStdPkgSrc to indicate when we should
require the source for GO standard packages when loading packages.
- generate the list of standard packages found in libgo and make that available
to build into the go tool
- set the flag Standard in the Package structure correctly for gccgo, based on
the list of expected libgo standard packages
- use the reqStdPkgSrc flag and the package.Standard flag to determine if the
load of the package should be attempted


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
  2015-03-20 17:27 ` [Bug go/65462] " boger at us dot ibm.com
@ 2015-03-20 20:42 ` boger at us dot ibm.com
  2015-03-20 20:43 ` ian at airs dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: boger at us dot ibm.com @ 2015-03-20 20:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

--- Comment #2 from boger at us dot ibm.com ---
Created attachment 35081
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35081&action=edit
Updated patch to add unsafe to the list of std package names


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
  2015-03-20 17:27 ` [Bug go/65462] " boger at us dot ibm.com
  2015-03-20 20:42 ` boger at us dot ibm.com
@ 2015-03-20 20:43 ` ian at airs dot com
  2015-03-20 20:45 ` boger at us dot ibm.com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ian at airs dot com @ 2015-03-20 20:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

--- Comment #3 from Ian Lance Taylor <ian at airs dot com> ---
Can you send the libgo part of this patch through the codereview site?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
                   ` (2 preceding siblings ...)
  2015-03-20 20:43 ` ian at airs dot com
@ 2015-03-20 20:45 ` boger at us dot ibm.com
  2015-03-20 21:34 ` ian at airs dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: boger at us dot ibm.com @ 2015-03-20 20:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

--- Comment #4 from boger at us dot ibm.com ---
Do you mean as if submitting to gofrontend-dev?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
                   ` (3 preceding siblings ...)
  2015-03-20 20:45 ` boger at us dot ibm.com
@ 2015-03-20 21:34 ` ian at airs dot com
  2015-03-20 21:55 ` boger at us dot ibm.com
  2015-03-24 22:13 ` ian at airs dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ian at airs dot com @ 2015-03-20 21:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

--- Comment #5 from Ian Lance Taylor <ian at airs dot com> ---
Yes, I did mean for gofrontend-dev.

Or if you want to submit to the master sources, that is even better; guidelines
are at http://golang.org/doc/contribute.html .


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
                   ` (4 preceding siblings ...)
  2015-03-20 21:34 ` ian at airs dot com
@ 2015-03-20 21:55 ` boger at us dot ibm.com
  2015-03-24 22:13 ` ian at airs dot com
  6 siblings, 0 replies; 8+ messages in thread
From: boger at us dot ibm.com @ 2015-03-20 21:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

--- Comment #6 from boger at us dot ibm.com ---
I decided that you meant the gofrontend so here it is (just did the hg mail)

https://codereview.appspot.com/213570043/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug go/65462] Use of 'go get' with gccgo is not finding dependencies correctly
  2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
                   ` (5 preceding siblings ...)
  2015-03-20 21:55 ` boger at us dot ibm.com
@ 2015-03-24 22:13 ` ian at airs dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ian at airs dot com @ 2015-03-24 22:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65462

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Ian Lance Taylor <ian at airs dot com> ---
Fixed now, I hope.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-24 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 19:38 [Bug go/65462] New: Use of 'go get' with gccgo is not finding dependencies correctly boger at us dot ibm.com
2015-03-20 17:27 ` [Bug go/65462] " boger at us dot ibm.com
2015-03-20 20:42 ` boger at us dot ibm.com
2015-03-20 20:43 ` ian at airs dot com
2015-03-20 20:45 ` boger at us dot ibm.com
2015-03-20 21:34 ` ian at airs dot com
2015-03-20 21:55 ` boger at us dot ibm.com
2015-03-24 22:13 ` ian at airs dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).