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

adding httptrace package #26

Open
rajatjindal opened this issue Apr 9, 2024 · 2 comments
Open

adding httptrace package #26

rajatjindal opened this issue Apr 9, 2024 · 2 comments

Comments

@rajatjindal
Copy link

hello folks,

Thank you for your wonderful work on TinyGo.

I am trying to update one of my app from TinyGo 1.29 to 1.31.x, and running into a problem because package net/http/httptrace no longer exists. an issue in TinyGo repo has been reported for this here: tinygo-org/tinygo#4186

is there any objection (or obvious known blockers) to adding the package in this repo? I am happy to try to submit a PR for that if this is ok to add.

many thanks for considering
Rajat Jindal

@rajatjindal
Copy link
Author

to implement this, I was thinking of doing following:

  1. add /src/internal/nettrace/nettrace.go - this just has some type definitions, so should be straightforward to add
  2. add /http/httptrace/trace.go - bring the code over from official golang net package and verify the tests.

There is a possibility that this might not work, in which case, I was thinking we can just stub out the exported functions. This will atleast allow the compilation to succeed.

Also happy to hear if there are other approaches we can take for making progress on this issue.

thank you

@endocrimes
Copy link

There is a possibility that this might not work, in which case, I was thinking we can just stub out the exported functions. This will atleast allow the compilation to succeed.

This does introduce the problem that code that works with Big Go will compile but fail to actually work with TinyGo, which seems more dangerous than having to reimplement bits of httputil/httptrace in your own code though 😅

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