Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: misplaced error message about case-insensitive file name collision #38034

Closed
rsc opened this issue Mar 23, 2020 · 5 comments
Closed

cmd/go: misplaced error message about case-insensitive file name collision #38034

rsc opened this issue Mar 23, 2020 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Mar 23, 2020

This error should say the problem is in math, not reflect:

$ cd go/src/math
$ go build cmd/go
$ echo package math >Asinh.go
$ go build cmd/go
../reflect/value.go:8:2: case-insensitive file name collision: "Asinh.go" and "asinh.go"
$ 

/cc @bcmills @jayconrod @matloob

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Mar 23, 2020
@rsc rsc added this to the Go1.15 milestone Mar 23, 2020
@bcmills
Copy link
Contributor

bcmills commented Mar 23, 2020

I wonder if @matloob's CL 224660 already fixes this — it's at least very nearby.

@andybons
Copy link
Member

@matloob @bcmills any update on this? Thanks.

@matloob
Copy link
Contributor

matloob commented Apr 16, 2020

This still exists at head. I'll send a fix

@gopherbot
Copy link

Change https://golang.org/cl/228784 mentions this issue: cmd/go: add positions for load errors in call to load

xujianhai666 pushed a commit to xujianhai666/go-1 that referenced this issue May 21, 2020
This CL sets positions for errors from cals to load within the load
call itself, similar to how the rest of the code in pkg.go sets
positions right after the error is set on the package.

This allows the code to ensure that we only add positions either for
ImportPathErrors, or if an error was passed into load, and was set
using setLoadPackageDataError. (Though I'm wondering if the call
to setLoadPackageDataError should be done before the call to load).

Fixes golang#38034

Change-Id: I0748866933b4c1a329954b4b96640bef702a4644
Reviewed-on: https://go-review.googlesource.com/c/go/+/228784
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
@gopherbot
Copy link

Change https://golang.org/cl/304069 mentions this issue: cmd/go/internal/load: use setLoadPackageDataError in loadImport

gopherbot pushed a commit that referenced this issue Mar 25, 2021
This makes the error handling in loadImport somewhat more uniform,
with no discernable effect on reported errors.

Noticed in CL 303869.

Updates #36087
Updates #38034

This somewhat simplifies the code, with no discernable effect on

Change-Id: I30521f658f264d6f99d1844d6701269bbb372246
Reviewed-on: https://go-review.googlesource.com/c/go/+/304069
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
@golang golang locked and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants