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

Add net.Buffers #2314

Merged
merged 2 commits into from
Dec 9, 2021
Merged

Add net.Buffers #2314

merged 2 commits into from
Dec 9, 2021

Conversation

fgsch
Copy link
Contributor

@fgsch fgsch commented Nov 25, 2021

Should fix the remaining problem from mailru/easyjson#335, for the most part.

Should fix mailru/easyjson#335, for the
most part.
@fgsch
Copy link
Contributor Author

fgsch commented Nov 25, 2021

For completion, if we try to build or run the code in the linked issue under macos we get:

Undefined symbols for architecture x86_64:
  "_crypto/x509/internal/macos.x509_CFStringCreateWithBytes_trampoline", referenced from:
      _crypto/x509/internal/macos$pack in main.o
  "_internal/abi.FuncPCABI0", referenced from:
      _crypto/x509/internal/macos.StringToCFString in main.o
  "_crypto/ed25519/internal/edwards25519/field.feSquare", referenced from:
      _(*crypto/ed25519/internal/edwards25519/field.Element).Square in main.o
  "_crypto/ed25519/internal/edwards25519/field.feMul", referenced from:
      _(*crypto/ed25519/internal/edwards25519/field.Element).Multiply in main.o
  "_vendor/golang.org/x/sys/cpu.xgetbv", referenced from:
      _runtime.run$1$gowrapper in main.o
  "_crypto/x509/internal/macos.syscall", referenced from:
      _crypto/x509/internal/macos.StringToCFString in main.o
  "_vendor/golang.org/x/sys/cpu.darwinSupportsAVX512", referenced from:
      _runtime.run$1$gowrapper in main.o
  "_vendor/golang.org/x/sys/cpu.cpuid", referenced from:
      _runtime.run$1$gowrapper in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: failed to link /.../tinygo1105991511/main: exit status 1

This builds and runs fine under wasi, and at least builds in other platforms.

@dgryski
Copy link
Member

dgryski commented Nov 25, 2021

This is because of the net/http import in easyjson's helpers.go.

Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

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

LGTM. Are there net.Buffers tests from stdlib that should be moved over too?

@fgsch
Copy link
Contributor Author

fgsch commented Nov 30, 2021

@dgryski there are some we can use. I will update this PR tomorrow.

@deadprogram
Copy link
Member

@fgsch will you add the tests you mentioned to this PR? 😸

@fgsch
Copy link
Contributor Author

fgsch commented Dec 6, 2021

@deadprogram Yeah, sorry. Been afk the last couple of days. I will get this done today.

@fgsch fgsch force-pushed the fgsch/net-buffers branch 3 times, most recently from c61816f to 8ca2343 Compare December 6, 2021 22:43
@fgsch
Copy link
Contributor Author

fgsch commented Dec 8, 2021

@deadprogram tests added.

@deadprogram
Copy link
Member

Thank you @fgsch for working on this and thanks @dgryski for the review. Now merging.

@deadprogram deadprogram merged commit cfe6b97 into tinygo-org:dev Dec 9, 2021
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.

3 participants