Requesting suggestions for the comment and description strings in installer.wxs.
Fixes#2394.
R=rsc, alex.brainman, tjyang2001
CC=golang-dev
https://golang.org/cl/5339046
Fixes crash when cgo consumes more than 8K
of stack and makes a callback.
Fixes#1328.
R=golang-dev, rogpeppe, rsc
CC=golang-dev, mpimenov
https://golang.org/cl/5371042
If a frame has multiple windows then the windows must all be restored
after gofmt has finished and the old windows must be restored.
Before this fix, only the Go code edit window would be left.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5280050
There may be more fine-tuning down the line,
but this CL fixes the most pressing issue at
hand.
Also: gofmt -w src misc
Fixes#1524.
R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4975053
Also standardize on 'utf8' as encoding name.
Apparently either is acceptable.
The user, because it is a StringProperty,
must be of type unicode in order to handle
Unicode correctly. It must *not* have type string.
The desc, because it is a BlobProperty, must
be of type string in order to handle Unicode correctly.
It must *not* have type unicode.
Yay encoding type pedantry without static typing.
R=adg, mattn.jp
CC=golang-dev
https://golang.org/cl/4973045
It's a balance between fetching too much
and falling far enough behind that you can't
catch up. We missed 20 commits in a row
when the builders were down for a few days.
This gives us a little more leeway.
R=adg
CC=golang-dev
https://golang.org/cl/4936047
Allocate Defer on stack during cgo calls, as suggested
by dvyukov. Also includes some comment corrections.
benchmark old,ns/op new,ns/op
BenchmarkCgoCall 669 330
(Intel Xeon CPU 1.80GHz * 4, Linux 386)
R=dvyukov, rsc
CC=golang-dev
https://golang.org/cl/4910041
It's already in old/template; make that build.
Update a couple of references to point to the old template.
They can be updated later.
Update goplay to use exp/template.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4902046
This is just moving the URL code from package http into its own package,
which has been planned for a while.
Besides clarity, this also breaks a nascent dependency cycle the new template
package was about to introduce.
Add a gofix module, url, and use it to generate changes outside http and url.
Sadness about the churn, gladness about some of the naming improvements.
R=dsymonds, bradfitz, rsc, gustavo, r
CC=golang-dev
https://golang.org/cl/4893043
When the C API being used includes multiple names for the same
underlying symbol (e.g. multiple #define's for the same variable), then
cgo will generate the same placeholder variables for each name. This
then prevents the code from compiling due to multiple declarations of
the same variable - so change cgo to only create one instance of the
variable for the underlying symbol.
R=rsc
CC=golang-dev
https://golang.org/cl/4826055
This permits full URLs to be shown on the dashboard,
not just the repository roots.
This has been tested.
R=rsc, mattn.jp
CC=golang-dev
https://golang.org/cl/4627081
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.
R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051
This replaces most the map[string][]string usage with
a new Values type name, with the usual methods.
It also changes client.PostForm to take a Values, rather
than a map[string]string, closing a TODO in the code.
R=rsc
CC=golang-dev
https://golang.org/cl/4532123
1) runLog to return err==nil if program runs, but returns exitcode!=0;
2) runLog to return err!=nil when fails to create log file;
3) print failed program name, not just "all.bash".
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4532117
This removes exec.Run and replaces exec.Cmd with a
new implementation. The new exec.Cmd represents
both a currently-running command and also a command
being prepared. It has a good zero value.
You can Start + Wait on a Cmd, or simply Run it.
Start (and Run) deal with copying stdout, stdin,
and stderr between the Cmd's io.Readers and
io.Writers.
There are convenience methods to capture a command's
stdout and/or stderr.
R=r, n13m3y3r, rsc, gustavo, alex.brainman, dsymonds, r, adg, duzy.chan, mike.rosset, kevlar
CC=golang-dev
https://golang.org/cl/4552052
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
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
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
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
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
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
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
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
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
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
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
* 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
In line with other functions such as Fprintf, put the
thing to be written first.
Apologies for the breakages this is sure to cause.
R=rsc, gri, adg, eds, r2, aam
CC=golang-dev
https://golang.org/cl/4169042
This aligns the naming scheme with the testing package and
also lets govet work on more logging calls.
R=rsc
CC=golang-dev
https://golang.org/cl/4001048
This change fixes the import plugin so that the
defined commands are available when opening a new
Go buffer from within Vim itself.
R=adg, rsc
CC=golang-dev
https://golang.org/cl/3998053
Forcing the synchronization of 500 lines is both slower and
less precise than searching for a known sync point.
Unfortunately, though, the way to synchronize correctly is
using the grouphere instruction, which has a bug.
I've already proposed the fix to Vim, so future releases
should have this working. We can continue using the 500 lines
syncing for now.
This change just documents the proper way to sync.
R=adg, dsymonds
CC=golang-dev
https://golang.org/cl/4029047
New ftplugin adds Import and Drop commands for Go buffers
in Vim. These commands ensure that the provided package is
imported (or not imported) in the current Go buffer, using
proper style and ordering, without moving the cursor.
E.g.
:Import strings
:ImportAs . strings
:Drop strings
Two mappings are also introduced to help with the fmt package:
\f => :Import fmt
\F => :Drop fmt
R=adg
CC=golang-dev
https://golang.org/cl/4009043
#pragma dynexport is no longer needed for
this use of cgo, since the gcc and gc code are
now linked together into the same binary.
It may still be necessary later.
On the Mac, you cannot use the GOT to resolve
symbols that exist in the current binary, so 6l and 8l
translate the GOT-loading mov instructions into lea
instructions.
On ELF systems, we could use the GOT for those
symbols, but for consistency 6l and 8l apply the
same translation.
The translation is sketchy in the extreme
(depending on the relocation being in a mov
instruction) but it verifies that the instruction
is a mov before rewriting it to lea.
Also makes typedefs global across files.
Fixes#1335.
Fixes#1345.
R=iant, r
CC=golang-dev
https://golang.org/cl/3650042
Clean up an error message and error exit too.
Insert blank line after "DO NOT EDIT" comment
to keep it from being a doc comment.
Fixes#1213.
Fixes#1222.
R=r
CC=golang-dev
https://golang.org/cl/3608042
* Add documentation about array arguments. Fixes issue 1125.
* Do not interpret x, y := z, w as special errno form. Fixes issue 952.
* Fix nested Go calls (brainman). Fixes issue 907.
R=r
CC=golang-dev
https://golang.org/cl/2214044
- fix release upload
- add -rev= flag to build specific revision and exit
- added support for all-$GOARCH.bash
R=rsc
CC=golang-dev
https://golang.org/cl/2247044
Plus automatic package<->project association script.
(This is just a helper script for now. I intend to fully automate
the associations further down the track.)
R=rsc
CC=golang-dev
https://golang.org/cl/1715054
* remember #defined names, so that C.stdout can refer
to the real name (on OS X) __stdoutp.
* better handling of #defined constant expressions
* allow n, err = C.strtol("asdf", 0, 123) to get errno as os.Error
* write all output files to current directory
* don't require gcc output if there was no input
Fixes#533.
Fixes#709.
Fixes#756.
R=r
CC=dho, golang-dev, iant
https://golang.org/cl/1734047
Based on the review of CL 1723044, I've changed the installation instructions
for the vim syntax files to suggest symlinking the files rather than copying
the files. Also the wording has changed to be more consistent.
R=golang-dev, Kyle Lemons, adg
CC=golang-dev
https://golang.org/cl/1702045
This sets up vim to work out of the box with go programs as long as syntax
highlighting is enabled. Both files must be copied to the vim runtime
directory in order for the file-type detection and syntax loading to work.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/1723044
This results in a 10-20x size reduction per record.
(from ~150kb to ~10kb)
This revision has been pushed live, as I'm in the process of
converting Log records to bz2-compresed CompressedLog records.
I would have waited but we're running seriously low on space
and it seemed like a sane (and reversible) move.
R=rsc
CC=golang-dev
https://golang.org/cl/872048
this is a version synthesized from rsc's, dean's and my
versions. changes and updates:
- embeds the retval script and pushes a new version to the
device if needed
- passes arguments correctly to the program on the device
- export GOARCH, GOTRACEBACK and GOGC from the local
environment to the device.
- added times.out support to run-arm
enabled a few tests that are now passing and moved the
GOGC=off workaround to run-arm.
R=dpx
CC=golang-dev, rsc
https://golang.org/cl/880046
various caching. make benchmark data a list
in a single per-builder,benchmark record instead
of having one record for each data point.
significant reduction in datastore cpu charges.
R=agl1, agl
CC=golang-dev
https://golang.org/cl/217111
reorganize benchmark computation so that it is
incremental. if it times out, it doesn't lose the
pieces it already computed, so that next time it
has a fighting chance to finish.
R=agl1, agl
CC=golang-dev
https://golang.org/cl/216046
* fix bug in benchmark collection: bad benchmark data key
meant that all the builders collided when writing data.
* report benchmarks even if make bench exits non-zero.
* graphical and json presentations
R=agl1
CC=golang-dev
https://golang.org/cl/201065
so that if you have a key.py with the real key,
there is no chance hg change will accidentally
make a CL with the real key and upload it to codereview.
R=agl1
CC=golang-dev
https://golang.org/cl/196051
This has actually been running for a while and gathering benchmark
data. I haven't had a chance to add a UI for it yet however.
R=rsc
CC=golang-dev
https://golang.org/cl/194082
Sometimes during editing, when the buffer is emptied (for example,
as part of a call to M-x gofmt), an error is raised when
remove-text-properties is called. Ensure that these calls use point-max
instead of buffer-size to determine their end point.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/189042
These are the scripts behind godashboard.appspot.com. Nothing is
particularly beautiful about it, but it does run.
I still need to add support for per-builder keys and for running the
benchmarks.
R=rsc
CC=golang-dev
https://golang.org/cl/183153
Added definition for raw string.
Added definitions for function and method declarations.
Enabled function, method, and type declarations to appear in Editor pop up menu.
Fixes#466.
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/183065
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
1st set of files.
R=rsc
CC=agl, golang-dev, iant, ken2, r
https://golang.org/cl/180047
This change removes the necessity to have GOBIN in $PATH,
and also doesn't assume that the build is being run from
$GOROOT/src. This is a minimal set of necessary changes
to get Go to build happily from the FreeBSD ports
collection.
R=rsc
CC=golang-dev
https://golang.org/cl/171044