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

fsthttp/{transport,adapter}.go imports net/http, breaking native mac build? #31

Open
dkegel-fastly opened this issue Mar 11, 2023 · 3 comments

Comments

@dkegel-fastly
Copy link
Collaborator

An app that imports fsthttp, and which builds in both go, tinygo native, and tinygo wasm
(with -tag nofastlyhostcalls) stopped building on tinygo native when we upgraded it to
v0.1.2; wrapping fsthttp/{transport,adapter}.go in another build tag seems to resolve the problem.

So adding a build tag to disable the net/http dependency seems like a good thing to add...
maybe named fastly.compute.nostdhttp for clarity.

@dgryski
Copy link
Member

dgryski commented Mar 11, 2023

This seems reasonable. The net/http package is also a large dependency, and people who are only using C@E won't need it. That's probably easier than moving those two files to their own subpackage.

@dgryski
Copy link
Member

dgryski commented Mar 11, 2023

I wonder if we should actually go the other way and require opting in to the net/http dependency? Although if we're going to break the API, having it in a separate package is probably nicer.

@dgryski
Copy link
Member

dgryski commented Oct 9, 2024

tinygo-org/tinygo#4502 should fix the Mac build but doesn't solve the issue of adding in a net/http for everybody who doesn't need it.

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

No branches or pull requests

2 participants