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

compiler/natives: generated src/reflect/reflect.go differs from disk copy #909

Closed
dmitshur opened this Issue Apr 9, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@dmitshur
Copy link
Member

dmitshur commented Apr 9, 2019

Running go generate ./compiler/natives causes the src/reflect/reflect.go file to get modified.

We should determine which of the two is more up to date (hopefully the file on disk) and fix up the inconsistency.

It might be related to commit 8471480.

/cc @hajimehoshi

@dmitshur dmitshur added the NeedsFix label Apr 9, 2019

@dmitshur

This comment has been minimized.

Copy link
Member Author

dmitshur commented Apr 9, 2019

Yep, confirmed it's just that comment from 8471480 that's missing from the virtual filesystem:

$ diff -U3 ./compiler/natives/src/reflect/reflect.go <(goexec -quiet 'f, err := natives.FS.Open("/src/reflect/reflect.go"); if err != nil {panic(err)}; io.Copy(os.Stdout, f)')
--- ./compiler/natives/src/reflect/reflect.go	2019-03-28 22:09:36.000000000 -0400
+++ /dev/fd/63	2019-04-09 19:56:20.000000000 -0400
@@ -550,10 +550,6 @@
 	m    *js.Object
 	keys *js.Object
 	i    int
-
-	// last is the last object the iterator indicates. If this object exists, the functions that return the
-	// current key or value returns this object, regardless of the current iterator. It is because the current
-	// iterator might be stale due to key deletion in a loop.
 	last *js.Object
 }
 

So this is a harmless diff.

dmitshur added a commit that referenced this issue Apr 10, 2019

compiler/natives: regenerate
Regenerate the virtual filesystem to include the comment addition
to /src/reflect/reflect.go from commit 8471480.

Fixes #909

This was referenced Apr 10, 2019

dmitshur added a commit that referenced this issue Apr 10, 2019

compiler/natives: regenerate
Regenerate the virtual filesystem to include the comment addition
to /src/reflect/reflect.go from commit 8471480.

Fixes #909
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.