Commit Graph

327 Commits

Author SHA1 Message Date
Robert Griesemer
b71598f704 set reasonable initial time stamp (instead of begin of epoch)
R=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=29970
CL=29973
2009-06-05 23:54:44 -07:00
Robert Griesemer
bd61c4e56e disable automatic p4 sync (new default)
TBR=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29969
CL=29969
2009-06-05 23:28:02 -07:00
Robert Griesemer
ebf38bf33f - cleanup: remove use of local ReadFile in favor of io.ReadFile
- don't show p4 sync output if -verbose is not set

R=rsc
DELTA=25  (5 added, 15 deleted, 5 changed)
OCL=29962
CL=29962
2009-06-05 17:55:55 -07:00
Robert Griesemer
42cf59a752 show remote addr instead of host in log lines
R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29961
CL=29961
2009-06-05 17:08:22 -07:00
Robert Griesemer
8604e18093 - added goroutine to automatically p4 sync the current workspace
- set "Updated" timestamp on served pages to p4 sync time

R=rsc
DELTA=72  (66 added, 3 deleted, 3 changed)
OCL=29959
CL=29959
2009-06-05 16:48:20 -07:00
Russ Cox
6609d2f88d restructure makefiles, scripts to factor out O= logic.
remove a few hardcoded paths elsewhere too.

R=r,gri
DELTA=123  (44 added, 15 deleted, 64 changed)
OCL=29914
CL=29945
2009-06-05 10:59:55 -07:00
Robert Griesemer
aa9ce6148a change datafmt syntax to use '@' instead of '^' (to match
convention used in template.go)

R=rsc
DELTA=22  (3 added, 1 deleted, 18 changed)
OCL=29780
CL=29782
2009-06-02 18:03:47 -07:00
Robert Griesemer
8083467d62 - renamed format -> datafmt
- factored out datafmt-specifics from pretty to ast

R=rsc
DELTA=3580  (1810 added, 1763 deleted, 7 changed)
OCL=29770
CL=29774
2009-06-02 17:18:27 -07:00
Robert Griesemer
d7acfc75cd format package
R=r,rsc
DELTA=2871  (1712 added, 1118 deleted, 41 changed)
OCL=29222
CL=29704
2009-06-01 19:13:44 -07:00
Russ Cox
99128fc7ab move pretty/comment.go into go/doc.
extract comment text code out of go/doc/doc.go into comment.go.
no code changes, just rearrangement.

first step so i can write tests.

R=gri
DELTA=633  (318 added, 301 deleted, 14 changed)
OCL=29269
CL=29293
2009-05-22 21:42:16 -07:00
Robert Griesemer
7d4765e2d3 show subdirectories if present in a package dir
R=rsc
DELTA=184  (69 added, 73 deleted, 42 changed)
OCL=29178
CL=29253
2009-05-22 10:24:28 -07:00
Robert Griesemer
787dd4d3f3 semi-weekly snapshot:
- format.go implementation complete
- lots of documentation added (not quite complete)

TBR=r
OCL=29130
CL=29130
2009-05-20 17:09:59 -07:00
Robert Griesemer
500f6b8e84 fix typo
TBR=rsc
OCL=29010
CL=29010
2009-05-18 16:48:38 -07:00
Robert Griesemer
7ff2536633 - make godoc restart feature work properly
R=rsc
DELTA=11  (10 added, 0 deleted, 1 changed)
OCL=29007
CL=29009
2009-05-18 16:26:34 -07:00
Robert Griesemer
1ed725d7cd - changed parser to return os.Error, removed ErrorHandler
- added IsValid predicate to token.Position
- updated pretty, godoc, gobuild
- updated/expanded test cases

R=rsc
DELTA=265  (97 added, 78 deleted, 90 changed)
OCL=28961
CL=29005
2009-05-18 14:59:16 -07:00
Robert Griesemer
e8c1e2b93a get rid of unused files in my home dir
TBR=r
DELTA=9270  (0 added, 9270 deleted, 0 changed)
OCL=28958
CL=28958
2009-05-15 19:15:45 -07:00
Robert Griesemer
b7585a31b7 weekly snapshot:
format.go:
- better error handling, indentation, support for defaults,
  environments for custom formatters, cleanups (more functionality, less code)

pretty.go:
- better comment printing using format.go

made test script more robust

TBR=r
DELTA=622  (175 added, 305 deleted, 142 changed)
OCL=28956
CL=28956
2009-05-15 18:52:59 -07:00
Robert Griesemer
8ee8fdea3c restart functionality
R=rsc
DELTA=21  (19 added, 0 deleted, 2 changed)
OCL=28938
CL=28941
2009-05-15 15:45:35 -07:00
Robert Griesemer
05851636f3 godoc fix: relative paths were incorrect
R=r
DELTA=13  (1 added, 6 deleted, 6 changed)
OCL=28840
CL=28844
2009-05-14 14:59:51 -07:00
Robert Griesemer
f3b08744a2 Simplified AST:
- one node for array and slice types
- one node for index and slice expressions
- simplified parser, astprinter, and ast.txt

R=r
DELTA=71  (0 added, 43 deleted, 28 changed)
OCL=28768
CL=28768
2009-05-13 15:18:05 -07:00
David Symonds
6c384d2268 Allow http.Redirect to do both temporary (307) and permanent (301) redirects.
This also adds a missing 'return' when a malformed URL is passed to it.

R=rsc
APPROVED=rsc
DELTA=30  (13 added, 2 deleted, 15 changed)
OCL=28598
CL=28710
2009-05-12 15:41:19 -07:00
Robert Griesemer
c6da3e5a69 A couple of godoc improvements:
- sort directories before printing
- apply filtering to factory functions and methods
- remove a couple of unused files

R=r
DELTA=84  (34 added, 40 deleted, 10 changed)
OCL=28657
CL=28657
2009-05-11 16:52:59 -07:00
Robert Griesemer
5a11a46e2d weekly snapshot
- godoc updated to work w/new directory structure

TBR=r
OCL=28624
CL=28624
2009-05-11 09:47:53 -07:00
Russ Cox
917aa35f8f implications of stricter type equality:
if both types are named, they must be
the same type (arising from the same
declaration).

R=r,gri
DELTA=44  (21 added, 4 deleted, 19 changed)
OCL=28436
CL=28577
2009-05-08 15:40:14 -07:00
Russ Cox
918afd9491 move things out of sys into os and runtime
R=r
OCL=28569
CL=28573
2009-05-08 15:21:41 -07:00
Rob Pike
01712ae7d3 embeddability: change bufio.BufRead to bufio.Reader etc.
R=rsc
DELTA=112  (0 added, 4 deleted, 108 changed)
OCL=28537
CL=28543
2009-05-08 11:52:39 -07:00
Rob Pike
c8b47c6fce Name change to improve embeddability:
io.Read->io.Reader
	io.Write,Close,etc.->io.Writer,Closer etc.

R=rsc
DELTA=190  (0 added, 0 deleted, 190 changed)
OCL=28525
CL=28535
2009-05-08 11:22:57 -07:00
Russ Cox
63629d5307 minor cleanup, not required by compiler changes
R=r
DELTA=14  (1 added, 4 deleted, 9 changed)
OCL=28447
CL=28509
2009-05-08 10:14:55 -07:00
Robert Griesemer
d76f095750 semi-weekly snapshot:
- format-driven pretty printing now handles all of Go code
- better error handling

R=r
OCL=28370
CL=28372
2009-05-06 16:28:18 -07:00
Robert Griesemer
19c239c9af - remove wrong fix
(this corresponds to the currently running version of godoc)

R=r
DELTA=11  (0 added, 10 deleted, 1 changed)
OCL=28238
CL=28238
2009-05-04 15:04:32 -07:00
Robert Griesemer
0d6a5f417f weekly snapshot:
- template-driven ast printing now can successfully
  reproduce entire Go programs

next steps:
- fine-tuning of output
- print interspersed comments
- cleanup and testing against all Go programs
- replace astprinter

R=r
OCL=28181
CL=28181
2009-05-01 19:32:41 -07:00
Robert Griesemer
22301e8cea Some adjustments to godoc:
- work-around for incorrect import path
- added tmpl root in order to run against a goroot w/o templates
- clarifications

Daily snapshot of syntax-driven formatter. Some progress.

Updated gccgo Makefile.

TBR=r
OCL=28004
CL=28004
2009-04-28 19:11:37 -07:00
Robert Griesemer
bf53e16f6d - install doc in lib/go
- adjust dependent files

R=rsc
DELTA=1132  (567 added, 562 deleted, 3 changed)
OCL=27862
CL=27862
2009-04-25 17:01:41 -07:00
Robert Griesemer
9b6009b651 - minor formatting and capitalization (export) changes
TBR=rsc
OCL=27861
CL=27861
2009-04-25 16:52:30 -07:00
Robert Griesemer
af8036aa6b - renamed docprinter.go -> doc.go
- adjusted dependent files
  (no changes in doc.go)

TBR=rsc
OCL=27860
CL=27860
2009-04-25 16:48:00 -07:00
Robert Griesemer
f8ff3b1055 daily snapshot:
- more work on template-driven ast formatting
- added preliminary test suite
- added documentation

TBR=r
OCL=27858
CL=27858
2009-04-25 16:36:17 -07:00
Robert Griesemer
3aa892c4f9 daily snapshot:
- more work on template-driven ast printing

R=r
OCL=27851
CL=27851
2009-04-24 17:22:58 -07:00
Robert Griesemer
448a7b46a9 daily snapshot:
- minor bug fixes in pretty, godoc
- first cut at template-driven printing of ast

TBR=r
OCL=27825
CL=27825
2009-04-23 21:53:01 -07:00
Rob Pike
9d70646fcf allow godoc to match on regular expressions.
if the name contains a metacharacter, use regexp matching;
otherwise require strict equality.

now
	godoc flag '.*Var'
can give you all the FooVar functions.

R=gri
DELTA=19  (19 added, 0 deleted, 0 changed)
OCL=27711
CL=27713
2009-04-21 22:46:19 -07:00
Rob Pike
4b62e8d7ef fix template.
.or works in .repeated so remove the comment.
the bug was in the template: .section executes iff the field is non-empty.

R=gri
DELTA=13  (6 added, 7 deleted, 0 changed)
OCL=27710
CL=27712
2009-04-21 22:26:08 -07:00
Robert Griesemer
dc08ad4f37 remove lots of accumulated crud:
- delete utility files which contained functionality that is now elsewhere
  (or saved the files away for now)
- cleanup Makefile (remove unnecessary deps)
- minor adjustments to godoc, fixed a couple of bugs
- make pretty.go self-contained

TBR=r
DELTA=625  (81 added, 510 deleted, 34 changed)
OCL=27700
CL=27702
2009-04-21 18:37:48 -07:00
David Symonds
8e4b65d041 Move iterable package to usr/dsymonds/.
R=r
APPROVED=r
DELTA=598  (330 added, 266 deleted, 2 changed)
OCL=27627
CL=27649
2009-04-20 18:13:14 -07:00
Rob Pike
7e1cfa7432 Readn is a silly name when there's no n. Change to FullRead.
R=gri
DELTA=15  (0 added, 0 deleted, 15 changed)
OCL=27619
CL=27619
2009-04-19 21:02:29 -07:00
Rob Pike
aaf63f8d06 Step 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors with os.Errors.
lib/template updated to use new setup; its clients also updated.

Step 2 will make os's error support internally much cleaner.

R=rsc
OCL=27586
CL=27586
2009-04-17 00:08:24 -07:00
Russ Cox
1f6463f823 Convert go tree to hierarchical pkg directory:
import (
		"vector" -> "container/vector"
		"ast" -> "go/ast"
		"sha1" -> "hash/sha1"
		etc.
	)

and update Makefiles.  Because I did the conversion
semi-automatically, I sorted all the import blocks
as a post-processing.  Some files have therefore
changed that didn't strictly need to.

Rename local packages to lower case.
The upper/lower distinction doesn't work on OS X
and complicates the "single-package directories
with the same package name as directory name"
heuristic used by gobuild and godoc to create
the correlation between source and binary locations.
Now that we have a plan to avoid globally unique
names, the upper/lower is unnecessary.

The renamings will cause trouble for a few users,
but so will the change in import paths.
This way, the two maintenance fixes are rolled into
one inconvenience.

R=r
OCL=27573
CL=27575
2009-04-16 20:52:37 -07:00
Russ Cox
60ce95d7a1 code changes for array conversion.
as a reminder, the old conversion
was that you could write

	var arr [10]byte;
	var slice []byte;
	slice = arr;

but now you have to write

	slice = &arr;

the change eliminates an implicit &, so that
the only implicit &s left are in the . operator
and in string(arr).

also, removed utf8.EncodeRuneToString
in favor of string(rune).

R=r
DELTA=83  (1 added, 23 deleted, 59 changed)
OCL=27531
CL=27534
2009-04-15 20:27:45 -07:00
Russ Cox
1605176e25 godoc: use data-driven templates for html, text generation
R=gri
DELTA=1341  (668 added, 282 deleted, 391 changed)
OCL=27485
CL=27526
2009-04-15 18:53:43 -07:00
Russ Cox
457b0030f7 godoc: supporting data
R=gri
DELTA=252  (240 added, 3 deleted, 9 changed)
OCL=27482
CL=27521
2009-04-15 18:38:37 -07:00
Rob Pike
ff12f2effd add (stub) parser to template code, enabling rewrite.
update pretty to use it.
change stdout to stderr in pretty.

R=rsc
DELTA=173  (52 added, 24 deleted, 97 changed)
OCL=27405
CL=27409
2009-04-14 00:06:49 -07:00
Russ Cox
3d0e4741eb godoc: switch to go library template system
R=gri
DELTA=272  (38 added, 139 deleted, 95 changed)
OCL=27372
CL=27390
2009-04-13 15:25:50 -07:00