Darwin was flaking. Its HFS filesystem is probably too slow.
Change-Id: I44ea6de8dae8054d41c94c0c36e703e62fbdfcd9
Reviewed-on: https://go-review.googlesource.com/30954
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The "sort" package is no longer quite as low-level as it once was.
Change-Id: Ic62d780841ef1172f65d4c00ec500994f94cb4b7
Reviewed-on: https://go-review.googlesource.com/30931
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Fix godoc test failure.
Skip fiximports test failure for now, to not hide other
failures. (tracking bug to fix properly in golang/go#17417)
x/tools being broken is preventing use of trybots for unrelated CLs.
Change-Id: I3a1deee4036096e0377cf8b63fabe444c58dd86e
Reviewed-on: https://go-review.googlesource.com/30953
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
If the parens of an ast.GenDecl are dropped, move the documentation
of the ImportSpec above the import statement, otherwise the the
code is invalid.
Fixesgolang/go#15432.
Change-Id: I715750b8f528380b96a6bc8b5f216043937976c2
Reviewed-on: https://go-review.googlesource.com/22415
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This package requires cl-lib.el in package header but it is not loaded
and cl.el functions are used instead of cl-lib functions. Using cl.el
functions causes byte-compile warnings.
Change-Id: I6d9400f9ced6a5cc0592d83da2ab1c1cf34e20b8
Reviewed-on: https://go-review.googlesource.com/27031
Reviewed-by: Alan Donovan <adonovan@google.com>
Also added a suite of tests and fixed a minor bug that
caused a panic when the .code command specified HL with
no text after.
Fixesgolang/go#17379.
Change-Id: I3c246523c3d4010bf76a467ee648475255090e1b
Reviewed-on: https://go-review.googlesource.com/30691
Reviewed-by: Rob Pike <r@golang.org>
Previously, a trailing slash would cause "foo/" to be treated as the
name of a package, with comical results.
Fixedgolang/go#14584
Change-Id: I660f8a079bbd63d3645812e516a9264c8e080e61
Reviewed-on: https://go-review.googlesource.com/30452
Reviewed-by: Robert Griesemer <gri@golang.org>
This allows type-based guru queries to work on arbitrary files at the
root or even outside of a GOPATH workspace (as "go run foo.go" does).
Fixesgolang/go#15797
Change-Id: I2be28f7259448e6398aae84d6ae7e71d8649967a
Reviewed-on: https://go-review.googlesource.com/30451
Reviewed-by: Robert Griesemer <gri@golang.org>
The `-r` option (to recurse into directories) need to be specified
else the created file consists only of the specified directory and
nothing else.
Change-Id: I624184fc2e88998a3119c12f8c328603588c123c
Reviewed-on: https://go-review.googlesource.com/17283
Reviewed-by: Russ Cox <rsc@golang.org>
Because go/types is slightly more strict than gc about certain "soft"
errors (ones that aren't necessary to interpret a Go program), gorename
rejects programs that compile under gc. This change relaxes gorename's
error checks so that they are weaker than gc's.
This is a workaround for issue golang/go#14596 in gorename,
whose underlying problem is issue golang/go#8560 in gc.
Fixesgolang/go#14596
Change-Id: Ica5006c2376c0564a575224269093c1497348ee6
Reviewed-on: https://go-review.googlesource.com/29853
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
When merging import declarations into a single block, AddNamedImport
modifies the list of declarations in the provided file while
iterating over the list. Take care to adjust the index into the list
so as to not skip entries or fall off the end.
Fixesgolang/go#17213
Change-Id: I807246f762c965ea1fc51eb57759f6088336db86
Reviewed-on: https://go-review.googlesource.com/29681
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Exposing the full paths to files is considered possible
source of vulnerabilities.
Change-Id: Ie9ae3791e51fcff5f1df711f84db9879d7e6ce37
Reviewed-on: https://go-review.googlesource.com/29445
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
I've been doing this by hand since Go 1.7rc2.
Updates golang/go#16333
Change-Id: Ib12c013b14210123d48d6ad78922caf1286c20cc
Reviewed-on: https://go-review.googlesource.com/29086
Reviewed-by: Alan Donovan <adonovan@google.com>
For /start/,/end/, the /end/ address can wrap around and match somewhere
before /start/. Handle this case without crashing.
Fixesgolang/go#7163.
Change-Id: I6fc3b5048e88728c9403a1d1e284ea8ada567a1e
Reviewed-on: https://go-review.googlesource.com/21182
Run-TryBot: Rob Pike <r@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
...to avoid executing the supportAVX2 assembly function.
Also, combine all no-op intrinsics into a single function.
Change-Id: Ic65a80d3a6df52c3850c34406f034781057a0991
Reviewed-on: https://go-review.googlesource.com/28711
Reviewed-by: Robert Griesemer <gri@golang.org>
Backport of https://go-review.googlesource.com/27814 changes to
bexport.go.
With this, the gcimporter15 is again up-to-date and in sync with both
the compiler's export code, and the compiler's and std lib gcimporter's
import code.
Change-Id: I8e229660eb78ddc1506b7b96a89c81ff083e0412
Reviewed-on: https://go-review.googlesource.com/27914
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Document a risk of generating invalid code due to shadowing between
identifiers in code files and the imported package names.
This risk was present before for any package with more than 1 .go file,
but it's increased when some files have renamed imports (since they're
typically used to resolve shadowing conflicts).
Resolves TODO(adonovan): support renaming imports.
Change-Id: Ie0e702345790fd2059c229623fb99fe645d688a4
Reviewed-on: https://go-review.googlesource.com/23785
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
This moves the 'go tool yacc' command from the main Go repo
to x/tools.
Copied from go rev 795ad07b3 + doc changes from "go tool yacc" to "goyacc".
Updates golang/go#11229
Change-Id: I6d17911a3bf64724c090c4fe4903238e3bce3b8c
Reviewed-on: https://go-review.googlesource.com/27324
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This change also puts more structure into the viewer.
Adds an enum for events that we'll issue and a few more elements
to organize things.
Change-Id: I39c7c53422779348ca05f051c6b0b07d22ad6a00
Reviewed-on: https://go-review.googlesource.com/26656
Reviewed-by: Alan Donovan <adonovan@google.com>
Moves runtime/trace support (including its command line flag) behind
a "gc" build tag to allow goimports to build under gccgo, which does
not support runtime/trace.
Updates golang/go#15544.
Change-Id: I017a44089c0a4f3d3ba98815d57a141e25b3fe56
Reviewed-on: https://go-review.googlesource.com/26998
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
mmapfile.go uses symbols in the syscall package that are not defined
on windows and some other operating systems. Temporarily
buildtag-restrict mmapfile to darwin and linux (the platforms easiest
for me to test) to fix the build.
Change-Id: Ib056608a655b6d32170cd86deac785811e7bc0d1
Reviewed-on: https://go-review.googlesource.com/26830
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This is based on github.com/tombergan/goheapdump/heapdump.
This CL mostly just copies over the 'raw' data structures based
on the profiler records' data structures. Many of them may need
to be changed, but I think it will be good to have these definitions
here to provide a base.
Change-Id: I609202b6b87d980b0835c8087b3d78e11bd6dfe3
Reviewed-on: https://go-review.googlesource.com/25584
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This will allow users to use a different flag name.
Change-Id: I252871b8efb6867e61ca507f59a9663cb7140b7d
Reviewed-on: https://go-review.googlesource.com/26632
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
I've had too many issues with customelements v1. The interface for v0
isn't as nice, and v0 will eventually be deprecated. But v1's polyfill
library is better supported, and it will be easy to upgrade later.
Change-Id: I87b376376b750167a0464c6c249930edecbd59db
Reviewed-on: https://go-review.googlesource.com/25545
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
This CL's purpose is to introduce the dependency on the HTML Custom
Elements polyfill. Like we've done so far, I'm trying to keep
dependencies light by using current or polyfilling future webcomponents
standards.
Change-Id: I11d14db367b697cdd527fb66b9d7d160ac244b78
Reviewed-on: https://go-review.googlesource.com/25494
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Add a configuration that allows unit testing of client Typescript
code using Karma and Jasmine. Add a basic test to exercise this.
Change-Id: I88af82b68547423efeaafb0fab8214ed39573ee9
Reviewed-on: https://go-review.googlesource.com/25411
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Evan Martin <evanm@google.com>
gcloud command no longer requires preview for deployment and is showing
warning when command is executed:
```
WARNING: The `gcloud preview app` command group is deprecated; please
use the `gcloud app` commands instead.
```
This change is removing "preview" text from README to make deploy
command up to date with gcloud.
Change-Id: I64d390ab4891f82fe608c64be20fae01a80d00fc
Reviewed-on: https://go-review.googlesource.com/25430
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This change breaks out the code that adds handler funcs and
starts the HTTP server into separate functions, so that they
can be overridden in other environments, such as Google's.
For instance, listenAndServe can be overridden in an init method
in a different file to use a HTTP2 server.
Updates golang/go#16410
Change-Id: I074242af10486c60c374e9ac7ebe9d0e61a8fa22
Reviewed-on: https://go-review.googlesource.com/25273
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This change primarily exists to import Typescript and the
ES6 module loader polyfill as dependencies for this project.
Both dependencies are relatively lightweight and can be easily
removed if we decide we don't need them.
The module loader polyfill implements support for an upcoming
browser feature in ES6 (the next version of JavaScript). This
feature helps modularize Javascript code and conveniently split it
into multiple files. It should be supported by the stable versions
of the four major browsers (Chrome, Firefox, Safari and Edge)
by the end of the year. Once that happens, we can remove the polyfill.
The Typescript compiler provides two things: First, it compiles
new, but not-yet-supported ES6 Javascript features into ES5. It
also provides a typechecker similar to what Closure does, but types
are indicated in syntax rather than JSDoc comments. If we decide
we don't want this dependency, we can compile the Typescript code
into human-readable JavaScript code. (The compiler basically
strips out types and replaces ES6 language features with more
well-supported JavaScript equivalents). The Typescript compiler
is not required for development. typescript.js and a feature in
the module loader will be used to compile Typescript into JavaScript
at serving time. (We might want to do something different for the
production version, but we can get to that later).
The change also adds code to serve the HTML and Javascript files.
Updates golang/go#16410
Change-Id: I42c669d1de636d8b221fc03ed22aa7ac60554610
Reviewed-on: https://go-review.googlesource.com/25240
Reviewed-by: Austin Clements <austin@google.com>
This allows the caller to indicate they want certain
import paths to sort into another group after 3rd-party
imports when added by goimports. For example, running
'goimports -local example.com/' might produce
import (
"database/sql"
"io"
"strconv"
"golang.org/x/net/context"
"example.com/foo/bar"
"example.com/foo/baz"
)
Resolvesgolang/go#12420
Change-Id: If6d88599f6cca2f102313bce95ba6ac46ffec1fe
Reviewed-on: https://go-review.googlesource.com/25145
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
The responsibility of flag.Usage is to print usage to stderr:
> Usage prints to standard error a usage message documenting all
> defined command-line flags.
Calling os.Exit(2) is outside of its scope, flag package does that.
Change-Id: I3eef2b796e5ddedff6d5927dbcdbfff3a6082270
Reviewed-on: https://go-review.googlesource.com/23788
Reviewed-by: Joseph Holsten <joseph@josephholsten.com>
Reviewed-by: Alan Donovan <adonovan@google.com>