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

Golang support #71

Open
sp-magicspells opened this issue Jun 22, 2020 · 4 comments · May be fixed by #112
Open

Golang support #71

sp-magicspells opened this issue Jun 22, 2020 · 4 comments · May be fixed by #112
Assignees

Comments

@sp-magicspells
Copy link

sp-magicspells commented Jun 22, 2020

Can we start supporting golang?

@mkr-plse
Copy link
Contributor

We haven't currently planned support for Go. Contributions are welcome.

@sp-magicspells
Copy link
Author

Thanks @mkr-plse. It would be very helpful If someone from Uber team guide us through supporting another language like Go.

@mkr-plse
Copy link
Contributor

Happy to help. Here are possible steps:

  1. Handcraft an input file with possible uses of feature flag APIs and then manually refactor it for treatment and control behavior. This forms the test for the implementation. For example, this testfile in Swift is refactored as shown here when treated, and refactored as follows when flag is in control.
  2. Use the go ast package to parse and rewrite the code. I think this blog article has some pointers on getting started.
  3. Internally, you may need to do partial program evaluation and can follow the implementation here (or as described in Section 4.3 of the paper) to simplify expressions for the rewrites.
  4. For the first version of the implementation, the deep clean pass (where code deletion exposes more opportunities for deletion) can be elided.

If you run into any issues, please feel free to reach out.

@mkr-plse mkr-plse pinned this issue Jun 27, 2020
@mkr-plse mkr-plse self-assigned this Jan 24, 2021
@mkr-plse
Copy link
Contributor

#112 implements PiranhaGo

@mkr-plse mkr-plse linked a pull request Mar 30, 2021 that will close this issue
@ketkarameya ketkarameya unpinned this issue May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants