8000 [go1.19] Updating more natives for go1.19 by grantnelson-wf · Pull Request #1264 · gopherjs/gopherjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[go1.19] Updating more natives for go1.19 #1264

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

Merged
merged 11 commits into from
Jan 31, 2024

Conversation

grantnelson-wf
Copy link
Collaborator
@grantnelson-wf grantnelson-wf commented Jan 31, 2024

Updating more natives for go1.19 without generics:

  1. Updated crypto: It had a copy/paste issue and had to remove the cache. The cache hooks into the GC to clear periodically. I wasn't sure if there was a JS equivalent or if we wanted to use a timer, so I just removed the cache, and now it is treated as if it was always a cache miss.
  2. Added fix for debug/pe: It had some unsafe pointers for casting one struct into another struct's memory footprint.
  3. Updated go/token/position: Was getting issues with finding most recent file so changed the fix to use *File directly.
  4. Updated hash/maphash: It had parts from go1.16 which could be updated to match closer to go1.19. It had some new methods, Bytes and String, that were using unsafe pointer.
  5. Updated reflect and reflectlite: It has some minor changes with some notable changes to Cap and Len to allow for pointers to arrays and to valueMethodName to try to get the correct function name.
  6. Updated fastrand and a usage of a fastrandu in net: Added the other fastrand methods (fastrandn, fastrand64, and fastrandu) to the runtime.
  7. Updated net/netip: Just some touchups and skipping a test.
  8. Updated sync/atomic: Skipping some tests.
  9. Updated syscall/js: Tiny cleanup

After this update go1.19 should be getting very close.

@grantnelson-wf grantnelson-wf marked this pull request as ready for review January 31, 2024 01:03
Copy link
Member
@nevkontakte nevkontakte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some details of the code are difficult for me to validate without spending way too much time, so I will trust into stdlib tests to do that for me. But in general these changes look reasonable to me.

Getting the CI to pass is a huge milestone, thank you!

@nevkontakte nevkontakte merged commit 9e28c32 into gopherjs:go1.19 Jan 31, 2024
@grantnelson-wf grantnelson-wf deleted the go1.19NativesUpdate branch January 31, 2024 23:41
@grantnelson-wf
Copy link
Collaborator Author

@nevkontakte Thank you so much for all your help. Yeah, getting CI passing really helped and will make this work go faster. I'm going to continue working on this effort as needed and help GopherJS continue towards go1.21 (or go1.22) as much as you need and I can.

I got Workiva to run the go1.19 branch on several of their (our since I work for them too) repos to see if the unit-tests for their specific code passes. They will not update to go1.19 until it is in master, this is just a "use case test" of the changes we've been making.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0