mdempsky / unconvert

Remove unnecessary type conversions from Go source
BSD 3-Clause "New" or "Revised" License
377 stars 26 forks source link

Is the project abandoned? #54

Closed ldez closed 2 years ago

ldez commented 2 years ago

Hello,

The project still uses the deprecated golang.org/x/tools/go/loader instead of golang.org/x/tools/go/analysis.

There are no new commits in two years, and no answer to issues.

https://github.com/golang/tools/blob/587a15310bddfc939d37cfaa8be8ea4c3808c3f1/go/loader/doc.go#L10-L11

mdempsky commented 2 years ago

I build tools primarily to address my own needs, and I publish them in case they're useful to others or inspire folks to build even better tools.

I wrote unconvert to help cleanup the Go runtime and toolchain source code after we translated it from C to Go. The result left us with a lot of unnecessary type conversions, but the large amount of GOOS/GOARCH-specific code made it difficult to notice which conversions were unnecessary under every combination. Hence why that's a core feature of unconvert.

And that cleanup was done back in early 2016: https://github.com/golang/go/commit/def1e7276a7636c1eafafdee7e32f2bcbd27d685, https://github.com/golang/go/commit/a03bdc3e6bea34abd5077205371e6fb9ef354481, https://github.com/golang/go/commit/1441f76938bf61a2c8c2ed1a65082ddde0319633

I don't intend to break unconvert, because I know some people still find it useful. But I haven't had a need for it in years, so I'm not especially motivated to put more effort into it.

ldez commented 2 years ago

Thank you for your answer. if someone does a migration PR to golang.org/x/tools/go/analysis would you accept it?

mdempsky commented 2 years ago

Probably not. Not because I think that's a bad idea, but I don't want to be on the hook for continuing to maintain unconvert.

If you or someone think that would be a good idea, you have my blessing to fork the project. Or start a new one, and reuse any ideas/code from unconvert that you find useful.