1
0
mirror of https://github.com/golang/go synced 2024-09-24 23:10:12 -06:00
Commit Graph

682 Commits

Author SHA1 Message Date
Alan Donovan
75d5c4af71 undo CL 19010044 / dbcd720e5396
bradfitz reports:
> It breaks go-mode on GNU Emacs 22.1.1 as ships with OS X 10.8.6.

««« original CL description
misc/emacs: various cleanups

- Use #' for function symbols
- Remove unused variables
- Use declare-function to shut up byte compiler

R=adonovan
CC=golang-dev
https://golang.org/cl/19010044

»»»

R=bradfitz
CC=golang-dev
https://golang.org/cl/19640043
2013-10-29 22:17:14 -04:00
Dominik Honnef
22b3822da7 misc/emacs: various cleanups
- Use #' for function symbols
- Remove unused variables
- Use declare-function to shut up byte compiler

R=adonovan
CC=golang-dev
https://golang.org/cl/19010044
2013-10-29 13:07:42 -04:00
Dominik Honnef
3b0e6c21ae misc/emacs: support godef-jump on import statements
The newest version of godef supports jumping to a package's source
directory if point is on an import statement.

R=adonovan
CC=golang-dev
https://golang.org/cl/18230043
2013-10-29 11:14:56 -04:00
Andrew Gerrand
e7426010c5 misc/linkcheck: better redirect handling, use meaningful exit code
Prevent linkcheck from following redirects that lead beyond the outside
the root URL.

Return a non-zero exit code when there are problems.

Some minor refactoring for clarity.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/14425049
2013-10-25 17:31:02 +03:00
Andrew Gerrand
9b321faae7 misc/dist: use go.tools release branch
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/15450047
2013-10-23 10:34:14 +04:00
Dominik Honnef
580ea8b5fd misc/emacs: handle empty "import ()" in go-goto-imports
R=adonovan
CC=golang-dev
https://golang.org/cl/14454058
2013-10-22 12:35:04 -04:00
Russ Cox
dbe2eacf04 cmd/cgo: fix line number in an error message
Fixes #6563.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14870046
2013-10-18 16:52:44 -04:00
Russ Cox
06ad3b2de1 cmd/cgo: stop using compiler error message text to analyze C names
The old approach to determining whether "name" was a type, constant,
or expression was to compile the C program

        name;

and scan the errors and warnings generated by the compiler.
This requires looking for specific substrings in the errors and warnings,
which ties the implementation to specific compiler versions.
As compilers change their errors or drop warnings, cgo breaks.
This happens slowly but it does happen.
Clang in particular (now required on OS X) has a significant churn rate.

The new approach compiles a slightly more complex program
that is either valid C or not valid C depending on what kind of
thing "name" is. It uses only the presence or absence of an error
message on a particular line, not the error text itself. The program is:

        // error if and only if name is undeclared
        void f1(void) { typeof(name) *x; }

        // error if and only if name is not a type
        void f2(void) { name *x; }

        // error if and only if name is not an integer constant
        void f3(void) { enum { x = (name)*1 }; }

I had not been planning to do this until Go 1.3, because it is a
non-trivial change, but it fixes a real Xcode 5 problem in Go 1.2,
and the new code is easier to understand than the old code.
It should be significantly more robust.

Fixes #6596.
Fixes #6612.

R=golang-dev, r, james, iant
CC=golang-dev
https://golang.org/cl/15070043
2013-10-18 15:56:25 -04:00
Andrew Gerrand
f5d25fd695 misc/dist: build race packages when os suffix present
The "darwin-amd64-osx10.8" target was not matching "darwin-amd64".

R=golang-dev
CC=golang-dev
https://golang.org/cl/14930043
2013-10-18 15:03:41 +09:00
Andrew Gerrand
73d7d12ea6 misc/dist: set default go.tools tag
Fixes #6607.

R=dsymonds
CC=golang-dev
https://golang.org/cl/14830043
2013-10-18 10:51:21 +09:00
Russ Cox
043ace1213 cmd/cgo: fix Xcode 5 incompatibility for #defined expressions
Ensure that clang always exits with a non-zero status by
giving it something that it always warns about (the statement "1;").

Fixes #6128.

R=golang-dev, iant, minux.ma
CC=golang-dev
https://golang.org/cl/14702043
2013-10-15 14:34:46 -04:00
Russ Cox
74f639176d misc/cgo/test: cut out non-standard functions
Otherwise the link fails. Fixes build.

TBR=golang-dev
CC=golang-dev
https://golang.org/cl/14483050
2013-10-15 14:25:29 -04:00
Russ Cox
94bd34fe50 misc/cgo/test: fix build (define prototype for alloca)
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/14454063
2013-10-15 13:46:57 -04:00
Russ Cox
56aeec31c6 cmd/cgo: work around bug in clang debug info for builtins like memset
Fixes #6506.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14682044
2013-10-15 12:46:14 -04:00
Ian Lance Taylor
cd61565ffc misc/cgo/test: fix C panic test to work with gccgo
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14611043
2013-10-11 11:24:54 -07:00
Andrew Gerrand
5f3a7aa217 go.tools/misc/dist: copy doc.go from go.tools to go root
This will allow "godoc godoc", "godoc vet", "godoc cover" to work.

Fixes #6527.

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/14566049
2013-10-11 10:37:32 +09:00
Yasuhiro Matsumoto
5516349fe7 misc/vim: complete packages in src directory
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14454059
2013-10-11 11:30:03 +11:00
Dominik Honnef
950c284b11 misc/emacs: send correct content-length to the playground
R=adonovan
CC=golang-dev
https://golang.org/cl/14548049
2013-10-10 16:49:19 -04:00
Dominik Honnef
47bb44fd5b misc/emacs: don't treat (foo)(bar) as a function call when preceded by a word character.
Fixes #6531.

R=adonovan
CC=golang-dev
https://golang.org/cl/14523043
2013-10-10 16:30:20 -04:00
Ian Lance Taylor
c774e90208 cmd/go: add any .c/.cc files to the SWIG shared library
Also add the action's object directory to the list of
directories we use to find SWIG shared libraries.

Fixes #6521.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14369043
2013-10-09 10:35:46 -07:00
Ian Lance Taylor
cb30917387 runtime/cgo: mark callback functions as NOSPLIT
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/14448044
2013-10-09 08:44:47 -07:00
Russ Cox
0965459bd9 debug/dwarf: handle surprising clang encoding
Fixes a bug in cgo on OS X using clang.
See golang.org/issue/6472 for details.

Fixes #6472.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14575043
2013-10-09 11:08:22 -04:00
Dominik Honnef
989a63eb0b misc/emacs: find unused imports where path and package name differ
The Go compiler emits extra information for this case:

imported and not used: "sandbox/foo_bar" as bar

R=adonovan
CC=golang-dev
https://golang.org/cl/14111043
2013-10-07 13:08:26 -04:00
Yasuhiro Matsumoto
45b830ed31 misc/vim: Autocompletion for :Godoc command
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14259043
2013-10-03 13:32:07 +10:00
Shenghou Ma
a978b1e049 misc/dist: support building statically linked toolchain.
so that we don't need worry about specifying the required
libc version (note: as cmd/go will still be dynamically
linked to libc, we still need to perform the build on OSes
with an old enough libc. But as cmd/go doesn't rely on many
libc symbols, the situation should be significantly better).

Fixes #3564.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14261043
2013-10-02 20:14:54 -04:00
Yasuhiro Matsumoto
fcee50c46e misc/vim: Separate package and package members.
This change allow to godoc:
    :Godoc github.com/mattn/go-gtk/gtk
    :Godoc github.com/mattn/go-gtk/gtk NewWindow
    :Godoc encoding/json
    :Godoc encoding/json Marshal

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14171043
2013-10-02 08:52:51 +10:00
Yasuhiro Matsumoto
d6eada282e misc/vim: "PACKAGE DOCUMENTATION" is not hilighted
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/14018043
2013-09-27 12:57:09 +10:00
Yasuhiro Matsumoto
b128426804 misc/vim: godoc is optional. so should point installation instruction.
R=golang-dev, r, dsymonds
CC=golang-dev
https://golang.org/cl/14017043
2013-09-27 12:35:03 +10:00
Dmitriy Vyukov
39361170d4 misc/pprof: support block profile
Fixes #6347.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13845044
2013-09-23 14:15:20 -07:00
ChaiShushan
e82031618a misc/notepadplus: fix some number syntax highlight issue
notepadplus can only support some normal golang's hex and imaginary numbers.
it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in ".0").

R=golang-dev, gvdschoot
CC=ajstarks, golang-dev
https://golang.org/cl/13401047
2013-09-23 11:35:17 +10:00
Andrew Gerrand
5ec8698862 misc/dist: add 'label' part of distro name, include blog content
This will allow us to cut binaries with names like:
        go1.2rc1.darwin-amd64-osx10.6.pkg
        go1.2rc1.darwin-amd64-osx10.8.pkg

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13629045
2013-09-19 16:51:29 +10:00
Shenghou Ma
db71e1557b cmd/go: fix missing __mingw_fprintf symbol for cgo on windows
Fixes #5986.

R=golang-dev, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/13261055
2013-09-19 01:20:02 -04:00
Shenghou Ma
9add729a1f cmd/ld: handle duplicate static symbols in COFF and Mach-O files.
Fixes #5740.

R=iant, rsc, luisbebop
CC=gobot, golang-dev
https://golang.org/cl/10345046
2013-09-18 22:27:25 -04:00
Russ Cox
92dfbd3611 cmd/cgo: fix build (missing file from earlier CL)
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/13700045
2013-09-16 14:21:54 -04:00
Russ Cox
647eaed93b cmd/cgo: allow C.malloc(0) always
Because we can, and because it otherwise might crash
the program if we think we're out of memory.

Fixes #6390.

R=golang-dev, iant, minux.ma
CC=golang-dev
https://golang.org/cl/13345048
2013-09-16 14:04:55 -04:00
Andrew Gerrand
73790d407c misc/dist: include cover and vet, add -tool flag to specify go.tools tag
Fixes #6356.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13333052
2013-09-13 10:28:30 +10:00
Russ Cox
71ed6eb25a misc/cgo/test: test of issue 4339
This is not quite what that issue reports,
because this does not involve a DLL.
But I wanted to make sure this much was working.

Update #4339

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/13653043
2013-09-11 09:56:38 -04:00
Emil Hessman
b6866f1945 misc/dist: Specify a version for the darwin package.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13383045
2013-09-09 09:36:39 +10:00
Dominik Honnef
b7a609b660 misc/emacs: use built-in buffer-base-buffer instead of own variable
R=adonovan
CC=golang-dev
https://golang.org/cl/13476043
2013-09-06 16:08:11 -04:00
ChaiShushan
640a57c881 misc/notepadplus: add interface to function list and use clang color in comments
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13587043
2013-09-06 11:59:53 -07:00
Aulus Egnatius Varialus
2b44b36487 cgo: enable cgo on dragonfly
Enable cgo for dragonfly/386 and dragonfly/amd64.

R=golang-dev, jsing, iant, bradfitz
CC=golang-dev
https://golang.org/cl/13247046
2013-09-04 15:19:21 -07:00
Ian Lance Taylor
f68c23e2bb cmd/cgo: don't let #cgo directives mess up line numbering
Fixes #5272.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13498046
2013-09-03 21:15:15 -07:00
Emil Hessman
8869cc159e misc/dist: remove Xcode files from the darwin binary distribution
Fixes #6132.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12858049
2013-08-30 10:11:18 +10:00
Brad Fitzpatrick
ccfe1bfd92 misc/pprof: work with either LWP::UserAgent or curl
Use either LWP::UserAgent or curl to make HTTP requests so it
works on Windows (most Perl distros include LWP::UserAgent),
and also on OS X (whose Perl at least sometimes doesn't
include LWP::UserAgent).

Fixes #6273

R=golang-dev, alex.brainman, cldorian
CC=golang-dev
https://golang.org/cl/13330044
2013-08-29 16:42:13 -07:00
Brad Fitzpatrick
2fb8022e58 misc: add linkcheck tool
Fixes #5378

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13247044
2013-08-29 12:08:11 -07:00
Shivakumar GN
daed1fee8b misc/pprof: pprof http used with net/http/pprof not working on windows/amd64
Removed posix assumptions in temporary file generation
Removed curl dependence
Changed opening of svg file

These must now work including symbol resolution.
[1] go tool pprof <prog_name> http://.../debug/pprof/profile
[2] go tool pprof http://.../debug/pprof/profile

Fixes 6177.

R=golang-dev, alex.brainman, bradfitz, kamil.kisiel
CC=golang-dev
https://golang.org/cl/13085043
2013-08-27 10:35:06 -07:00
Alan Donovan
264b73b3f2 misc/emacs: allow users to customize path of 'go' tool.
Some users have multiple Go development trees and invoke the
'go' tool via a wrapper that sets GOROOT and GOPATH based on
the current directory.  Such users should customize go-command
to point to the wrapper script.

R=dominik.honnef
CC=golang-dev
https://golang.org/cl/13233043
2013-08-27 09:47:58 -04:00
Emil Hessman
47ecd52377 misc/xcode: use xcode-select to determine path
If xcode-select is available, use it to determine the path to the
DVTFoundation.xcplugindata file.

Fixes #5997.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12741047
2013-08-20 20:48:29 +10:00
Aaron France
dccf651b24 misc/emacs: Detect stale coverage reports
When the coverage report file is older than the file we're
showing the coverage report for, then we show a simple message
to state this fact.

R=adonovan, dominik.honnef, bradfitz
CC=golang-dev
https://golang.org/cl/12919044
2013-08-19 16:32:00 -04:00
Dominik Honnef
29794b77dd misc/emacs: godef: print the entire description, not just the first line
When identifying structs or interfaces we really want to know
their makeup, not just their name.

R=adonovan
CC=golang-dev
https://golang.org/cl/13042043
2013-08-16 13:03:40 -04:00