Commit Graph

168 Commits

Author SHA1 Message Date
Robert Griesemer
59a190589a godoc: basic setup for running godoc on local app engine emulator
R=rsc
CC=golang-dev
https://golang.org/cl/4559058
2011-06-01 15:12:47 -07:00
Rob Pike
378c806c31 gophertool: make the keyword 'golang'
R=bradfitz
CC=golang-dev
https://golang.org/cl/4529102
2011-06-01 07:24:33 +10:00
Brad Fitzpatrick
f4349f7368 gophertool: also permit typing "go [whatever]" in omnibox
R=rsc
CC=golang-dev
https://golang.org/cl/4560056
2011-05-31 13:16:51 -07:00
Russ Cox
6216307e25 misc/cgo: remove reference to 'destroy' function
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4558042
2011-05-31 14:41:24 -04:00
Andrew Gerrand
55f8fd2684 gobuilder: remove some windows-specificity
R=alex.brainman
CC=golang-dev
https://golang.org/cl/4528109
2011-05-30 20:19:56 +10:00
Robert Hencke
3fbd478a8a pkg: spelling tweaks, I-Z
also, a few miscellaneous fixes to files outside pkg

R=golang-dev, dsymonds, mikioh.mikioh, r
CC=golang-dev
https://golang.org/cl/4517116
2011-05-30 18:02:59 +10:00
Yasuhiro Matsumoto
c6fd1e0115 misc/vim: limit Fmt command to Go buffers.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4548072
2011-05-30 12:20:00 +10:00
Andrew Gerrand
5784dcfd19 dashboard: send notification emails when the build breaks
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4530061
2011-05-30 11:27:31 +10:00
Alex Brainman
55dd63bb4e gobuilder: fixes for windows
R=r, devon.odell, iant, rsc, adg
CC=bradfitz, golang-dev, jdpoirier
https://golang.org/cl/4536053
2011-05-30 11:20:46 +10:00
Eric Eisner
ed0c0f2c80 misc/emacs: don't select the mark after gofmt
R=ajmani
CC=golang-dev
https://golang.org/cl/4553054
2011-05-23 22:47:25 -04:00
Brad Fitzpatrick
f5a011dd0c gophertool: also accept commit form 8486:ab29d2698a47
... as "hg log" produces by default.

And add a README.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4529080
2011-05-23 14:27:51 -07:00
Brad Fitzpatrick
09dd5bf13b gophertool: Chrome extension to aid in Go development
Contains common links & a smart text box that recognizes various
identifiers and jumps to one of:

* issue URL,
* codereview URL,
* commit URL,
* package docs

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4553058
2011-05-23 14:05:18 -07:00
Alexander Orlov
5107041df7 misc: syntax highlighting support on IntelliJ IDEA
Go keywords from Vim's syntax configuration file were used.
Issue Tracker Reference: http://code.google.com/p/go/issues/detail?id=1850

Fixes #1850.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4547054
2011-05-20 11:03:33 -07:00
Robert Griesemer
b790ae2efb go/printer, gofmt: fix formatting of expression lists (missing blank)
This appears to have been a long-standing formatting bug.
The test cases has misformatted golden files.

Applied gofmt -w src misc .

Fixes #1839.

R=iant
CC=golang-dev
https://golang.org/cl/4515113
2011-05-19 17:05:35 -07:00
David Symonds
816f4bb1d8 misc/vim: drop indent support for jump labels.
It interferes with keys in composite literals,
which are much more common.

R=dchest, jnwhiteh, rlight2
CC=golang-dev
https://golang.org/cl/4521065
2011-05-14 09:45:32 -07:00
Russ Cox
ac65eaa5b9 dashboard: delay hg pull until needed
R=adg
CC=golang-dev
https://golang.org/cl/4526052
2011-05-13 12:14:31 -04:00
David Symonds
1a7d09c847 misc/vim: new Vim indentation script.
This uses a fully custom function for indenting Go code in Vim.
It provides a lot more flexibility than a cindent-based approach,
so this version gets the := operator correct, as well as switch
labels and jump labels.

One outstanding TODO is to handle lines immediately after jump labels.

R=adg, n13m3y3r, jnwhiteh, dchest, rsc, rlight2
CC=golang-dev, rivercheng
https://golang.org/cl/4534047
2011-05-13 08:29:44 -07:00
Sameer Ajmani
cc5ac676da misc/emacs: bug fix: use UTF-8 when invoking gofmt as a subprocess.
Without this, Unicode characters are stripped out by M-x gofmt.

R=rsc, amdragon
CC=golang-dev
https://golang.org/cl/4523065
2011-05-13 11:05:03 -04:00
Brad Fitzpatrick
05a1b7ec41 http: remove finalURL from Client.Get; move to Response
This CL:

-- removes Response.RequestMethod string
-- adds Response.Request *Request
-- removes the finalURL result parameter from client.Get()
-- adds a gofix rule for callers of http.Get which assign
   the final url to the blank identifier; warning otherwise

Caller who did:

res, finalURL, err := http.Get(...)

now need to do:

res, err := http.Get(...)
if err != nil {
   ...
}
finalURL := res.Request.URL.String()

R=rsc
CC=golang-dev
https://golang.org/cl/4535056
2011-05-13 07:31:24 -07:00
Russ Cox
12c3afc1ae dashboard: fix for branches
In the new world, one builder runs
        gobuilder -commit
which uploads information about commits to the dashboard,
which then hands the work out to the builders by hash.
There is no assumption anymore that the commit numbers
are consistent across builders.

New builders will need to be deployed.  For now darwin-amd64
is running the new builder to test the code.

The new JSON-based protocol for handing out work via /todo
should be easy to extend if we want to add support for sending
trial CLs to the builders.

This code is already running on godashboard.appspot.com.

R=adg, dave
CC=golang-dev
https://golang.org/cl/4519047
2011-05-12 11:21:34 -04:00
Robert Griesemer
499ad9448b go/printer, gofmt: fix alignment of "=" in const/var declarations
gofmt -w src misc

Fixes #1414.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4456054
2011-05-09 15:16:34 -07:00
Brad Fitzpatrick
623e7de187 os: make Setenv update C environment variables
Fixes #1569

R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4456045
2011-05-02 12:38:13 -07:00
Russ Cox
f985638b94 misc/cgo/test: run tests
The new gotest ignores Test functions outside *_test.go files
(the old shell script allowed them), so replace one clumsy hack
with another.

The root problem is that the package makefiles only know
how to run cgo for source files in the package proper, not
for test files.  Making it work for test files is probably more
trouble than it's worth.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4452060
2011-05-02 13:55:51 -04:00
Andrew Gerrand
50e65ab30d builder: build multiple targets in parallel
R=rsc, dfc
CC=golang-dev
https://golang.org/cl/4452047
2011-04-27 10:12:10 +10:00
Russ Cox
63d531a83e dashboard: build most recent revision first
Will fill dashboard down the screen instead of up
when builders get stuck and resume.  Already live.

Also delete dead benchmark code.
I think it is safe to say that if/when we bring
benchmarks back, we will use a different
data model.

Fixes #1228.

R=adg
CC=golang-dev
https://golang.org/cl/4449059
2011-04-25 23:48:06 -04:00
Dmitry Chestnykh
99b0eefd40 misc/goplay: fix Tab and Shift+Enter in Firefox.
Fixes #1633.

R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/4439042
2011-04-16 18:44:51 +10:00
Dave Cheney
91dfae756e gobuilder: respect MAKEFLAGS if provided
R=adg
CC=golang-dev
https://golang.org/cl/4426041
2011-04-15 12:35:19 +10:00
Andrew Gerrand
9fba2a17c2 gobuilder: permit builders of the form goos-goarch-foo
R=dfc
CC=golang-dev
https://golang.org/cl/4416044
2011-04-15 11:56:56 +10:00
Andrew Gerrand
dcf32a24a0 builder: fix documentation s/\.gobuilder/.gobuildkey/
R=rsc
CC=golang-dev
https://golang.org/cl/4312051
2011-04-13 14:49:56 +10:00
Dmitry Chestnykh
89901bbd14 misc/vim: add plugin with Fmt command.
Fmt command filters the current Go buffer through gofmt.
It tries to preserve cursor position and avoids replacing
the buffer with stderr output.

R=golang-dev, dsymonds, niemeyer
CC=golang-dev
https://golang.org/cl/4382053
2011-04-13 11:55:41 +10:00
Gustavo Niemeyer
328aac3a49 godashboard: Show packages at launchpad.net
The changes were not tested for real in an App Engine environment,
so extra care should be taken.  That said, some static testing
was done with pyflakes, and a few existent problems were fixed on
the way.

R=adg
CC=golang-dev
https://golang.org/cl/4378053
2011-04-13 10:34:35 +10:00
David Symonds
dd4423292e misc/vim: update type highlighting for new reflect package
R=adg
CC=golang-dev
https://golang.org/cl/4385051
2011-04-11 08:48:19 +10:00
Russ Cox
de3aac609c gofix: don't rewrite O_APPEND opens
R=r, rog
CC=golang-dev
https://golang.org/cl/4364041
2011-04-05 11:12:02 -04:00
Rob Pike
8a90fd3c72 os: New Open API.
We replace the current Open with:
OpenFile(name, flag, perm) // same as old Open
Open(name) // same as old Open(name, O_RDONLY, 0)
Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666)

This CL includes a gofix module and full code updates: all.bash passes.
(There may be a few comments I missed.)

The interesting packages are:
        gofix
        os
Everything else is automatically generated except for hand tweaks to:
        src/pkg/io/ioutil/ioutil.go
        src/pkg/io/ioutil/tempfile.go
        src/pkg/crypto/tls/generate_cert.go
        src/cmd/goyacc/goyacc.go
        src/cmd/goyacc/units.y

R=golang-dev, bradfitzwork, rsc, r2
CC=golang-dev
https://golang.org/cl/4357052
2011-04-04 23:42:14 -07:00
Anthony Starks
731786439c misc/notepadplus: add syntax and completion support for notepad++
R=golang-dev, adg, peterGo
CC=golang-dev
https://golang.org/cl/4274072
2011-04-01 14:44:57 +11:00
Evan Shaw
ac74f14b6b kate: reorganize, remove closed()
R=rsc
CC=golang-dev
https://golang.org/cl/4325041
2011-03-29 01:12:39 -04:00
Andrew Gerrand
c3fa7305d1 dashboard: remove old python/bash builder, update README
R=rsc
CC=golang-dev
https://golang.org/cl/4275076
2011-03-26 11:56:34 +11:00
Sameer Ajmani
0ac151fd5c misc/emacs: gofmt: don't clobber the current buffer on failure
Change M-x gofmt to display errors in a new buffer instead of
clobbering the current buffer.

Add gofmt-before-save, which runs gofmt when in go-mode.  This
can be used with before-save-hook.  Add to your .emacs:
  (add-hook 'before-save-hook 'gofmt-before-save)

R=rsc, aclements, amdragon
CC=golang-dev
https://golang.org/cl/4276059
2011-03-24 10:35:39 -04:00
Anthony Starks
aa798d26c4 misc/bbedit: remove closed keyword
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4284058
2011-03-23 16:29:40 +11:00
David Symonds
aad62bf409 misc/vim: remove 'closed' as a builtin function.
R=adg, r
CC=golang-dev
https://golang.org/cl/4285059
2011-03-23 14:26:28 +11:00
Ian Lance Taylor
f91b37b962 Make.pkg: add support for SWIG, and add two SWIG examples
The SWIG examples are not yet built or tested by default.

R=r, rsc, iant2
CC=golang-dev
https://golang.org/cl/4287056
2011-03-22 13:05:51 -07:00
Robert Griesemer
6684d5503a go/printer, gofmt: simplify struct formatting and respect line breaks
Also: gofmt src misc

Fixes #1627.

R=rsc
CC=golang-dev
https://golang.org/cl/4303042
2011-03-22 11:05:26 -07:00
Andrew Gerrand
5dd0869bf5 codereview: permit CLs of the form weekly.DATE
gobuilder: recognize CLs of the form weekly.DATE

R=rsc, r
CC=golang-dev
https://golang.org/cl/4282052
2011-03-17 09:11:08 +11:00
Ross Light
d7eacee603 misc/vim: Add indent script for Vim
R=adg
CC=golang-dev
https://golang.org/cl/4258041
2011-03-08 15:42:23 +11:00
Robert Griesemer
4b4a1ea899 misc/dashboard/builder/doc.go: gofmt it
R=r, adg
CC=golang-dev
https://golang.org/cl/4256052
2011-03-07 11:00:57 -08:00
Russ Cox
f9ca3b5d5b runtime: scheduler, cgo reorganization
* Change use of m->g0 stack (aka scheduler stack).
* Provide runtime.mcall(f) to invoke f() on m->g0 stack.
* Replace scheduler loop entry with runtime.mcall(schedule).

Runtime.mcall eliminates the need for fake scheduler states that
exist just to run a bit of code on the m->g0 stack
(Grecovery, Gstackalloc).

The elimination of the scheduler as a loop that stops and
starts using gosave and gogo fixes a bad interaction with the
way cgo uses the m->g0 stack.  Cgo runs external (gcc-compiled)
C functions on that stack, and then when calling back into Go,
it sets m->g0->sched.sp below the added call frames, so that
other uses of m->g0's stack will not interfere with those frames.
Unfortunately, gogo (longjmp) back to the scheduler loop at
this point would end up running scheduler with the lower
sp, which no longer points at a valid stack frame for
a call to scheduler.  If scheduler then wrote any function call
arguments or local variables to where it expected the stack
frame to be, it would overwrite other data on the stack.
I realized this possibility while debugging a problem with
calling complex Go code in a Go -> C -> Go cgo callback.
This wasn't the bug I was looking for, it turns out, but I believe
it is a real bug nonetheless.  Switching to runtime.mcall, which
only adds new frames to the stack and never jumps into
functions running in existing ones, fixes this bug.

* Move cgo-related code out of proc.c into cgocall.c.
* Add very large comment describing cgo call sequences.
* Simpilify, regularize cgo function implementations and names.
* Add test suite as misc/cgo/test.

Now the Go -> C path calls cgocall, which calls asmcgocall,
and the C -> Go path calls cgocallback, which calls cgocallbackg.

The shuffling, which affects mainly the callback case, moves
most of the callback implementation to cgocallback running
on the m->curg stack (not the m->g0 scheduler stack) and
only while accounted for with $GOMAXPROCS (between calls
to exitsyscall and entersyscall).

The previous callback code did not block in startcgocallback's
approximation to exitsyscall, so if, say, the garbage collector
were running, it would still barge in and start doing things
like call malloc.  Similarly endcgocallback's approximation of
entersyscall did not call matchmg to kick off new OS threads
when necessary, which caused the bug in issue 1560.

Fixes #1560.

R=iant
CC=golang-dev
https://golang.org/cl/4253054
2011-03-07 10:37:42 -05:00
Andrew Gerrand
34f2f68354 gobuilder: add -package flag to build external packages
Also add -v for verbose logging.

R=rsc, gri, r, r2
CC=golang-dev
https://golang.org/cl/4172056
2011-03-03 14:41:09 +11:00
Andrew Gerrand
7f5acfb283 misc/dashboard/builder: talk to hg with utf-8 encoding always.
Fixes #1465.

R=rsc
CC=golang-dev
https://golang.org/cl/4172063
2011-02-23 07:47:53 +11:00
Andrew Gerrand
79ba1ce076 misc/dashboard: tweak build fail notification email
R=rsc
CC=golang-dev
https://golang.org/cl/4170063
2011-02-19 07:37:24 +11:00
Andrew Gerrand
00d8d0052a misc/dashboard: notify golang-dev on build failure
Fixes #1229.

R=rsc
CC=golang-dev
https://golang.org/cl/4178048
2011-02-18 03:34:22 +11:00