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

x/playground: vet produces incorrect results on programs that set // GOEXPERIMENT=rangefunc #64644

Open
j178 opened this issue Dec 11, 2023 · 5 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@j178
Copy link
Contributor

j178 commented Dec 11, 2023

Go version

go dev branch

What operating system and processor architecture are you using (go env)?

n/a

What did you do?

https://go.dev/play/p/vAn7V6xqpWQ?v=gotip

What did you expect to see?

The program compiles.

What did you see instead?

package play
	imports iter: build constraints exclude all Go files in /usr/local/go-faketime/src/iter
image
@seankhliao seankhliao changed the title playground: // GOEXPERIMENT=rangefunc not working x/playground: // GOEXPERIMENT=rangefunc not working Dec 11, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 11, 2023
@seankhliao
Copy link
Member

I don't think we've said anywhere that it should work

@prattmic prattmic added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 11, 2023
@prattmic
Copy link
Member

I'm not sure this is documented anywhere, but it was implemented in https://go.dev/cl/511640. I don't see why this wouldn't be working.

cc @rsc @findleyr

@dmitshur
Copy link
Contributor

Note that the program does compile; https://go.dev/play/p/DexLktKrFTb?v=gotip makes that easier to see. The problem appears to be that vet isn't being told about the experiment and thus doesn't work.

@dmitshur dmitshur changed the title x/playground: // GOEXPERIMENT=rangefunc not working x/playground: vet produces incorrect results on programs that set // GOEXPERIMENT=rangefunc Dec 11, 2023
@findleyr findleyr self-assigned this Dec 11, 2023
@gopherbot
Copy link

Change https://go.dev/cl/549015 mentions this issue: playground: pass GOEXPERIMENT values to vet

@findleyr
Copy link
Contributor

I suppose https://go.dev/cl/549015 probably fixes this, but need to remember how to test.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants