On 2011/03/11 16:26:33, rsc wrote: > We can worry about Clean in a separate CL. ...
14 years, 4 months ago
(2011-03-12 08:32:07 UTC)
#12
On 2011/03/11 16:26:33, rsc wrote:
> We can worry about Clean in a separate CL.
Sorry, but the build fails.
cd $GOROOT/src/pkg/go/scanner
make test
fails with:
gotest
make[1]: Entering directory `/C/MinGW/go/src/pkg/go/scanner'
rm -f _test/go/scanner.a
make[1]: Leaving directory `/C/MinGW/go/src/pkg/go/scanner'
make[1]: Entering directory `/C/MinGW/go/src/pkg/go/scanner'
rm -f _test/go/scanner.a
gopack grc _test/go/scanner.a _gotest_.8
make[1]: Leaving directory `/C/MinGW/go/src/pkg/go/scanner'
--- FAIL: scanner.TestLineComments (0.0 seconds)
bad filename for "line100": got dir\File1.go, expected dir/File1.go
bad filename for "line200": got dir\File2.go, expected dir/File2.go
bad filename for "line42": got dir\foo, expected dir/foo
bad filename for "line44": got dir\foo, expected dir/foo
bad filename for "line46": got dir\foo, expected dir/foo
bad filename for "line48": got dir\foo, expected dir/foo
bad filename for "line42": got dir\bar, expected /bar
bad filename for "line42": got dir\foo, expected dir/foo
bad filename for "line100": got dir\a\b\c\File1.go, expected dir/a/b/c/File1.go
FAIL
make: *** [test] Error 1
On 2011/03/12 08:32:07, brainman wrote: > On 2011/03/11 16:26:33, rsc wrote: > > We can ...
14 years, 3 months ago
(2011-03-15 00:56:14 UTC)
#13
On 2011/03/12 08:32:07, brainman wrote:
> On 2011/03/11 16:26:33, rsc wrote:
> > We can worry about Clean in a separate CL.
>
> Sorry, but the build fails.
>
Russ, I'm OK to submit this CL. But I would like to know how to fix the build
after.
This:
diff -r 34118d2bd7d3 src/pkg/go/scanner/scanner.go
--- a/src/pkg/go/scanner/scanner.go Mon Mar 14 14:12:37 2011 -0700
+++ b/src/pkg/go/scanner/scanner.go Tue Mar 15 11:52:14 2011 +1100
@@ -181,7 +181,7 @@
if line, err := strconv.Atoi(string(text[i+1:])); err == nil && line > 0 {
// valid //line filename:line comment;
filename := filepath.Clean(string(text[len(prefix):i]))
- if filename[0] != '/' {
+ if !filepath.IsAbs(filename) {
// make filename relative to current directory
filename = filepath.Join(S.dir, filename)
}
will fix "absolute or relative" path detection. But the rest are due to test
code expects file paths to have / as a delimiter. How do you propose to change
the test code to make it pass.
Thank you.
Alex
Issue 4249064: code review 4249064: path: work for windows.
(Closed)
Created 14 years, 4 months ago by mattn
Modified 14 years, 3 months ago
Reviewers:
Base URL:
Comments: 38