facebookincubator / fastmod

A fast partial replacement for the codemod tool
Apache License 2.0
1.68k stars 42 forks source link

Publish fastmod to Docker Hub, so that it can be used in container-based codemodding frameworks #29

Closed kkom closed 3 years ago

kkom commented 3 years ago

I am wondering if it would be possible publish fastmod to Docker Hub in some official capacity, so that it could be used verbatim in the Sourcegraph batch changes spec?

This whole batch changes codemodding framework is container-based, similar to how Google Cloud Build configs work:

https://docs.sourcegraph.com/batch_changes/quickstart#write-a-batch-spec

Is this something Facebook ever does for other open source tools? I realize this can be done unofficially fairly easily, but an official image would be nice.

For example, https://github.com/comby-tools/comby/ is published to https://hub.docker.com/r/comby/comby (well, no wonder, since the main author is at Sourcegraph :) )

swolchok commented 3 years ago

I am completely unfamiliar with Docker, so realistically I am unlikely to do this. Sorry!

kkom commented 3 years ago

That's fair, thanks for the the quick reply @swolchok! Tupperware isn't a thing outside of Facebook unfortunately ;)

Feel free to close the issue, unless you think that at some point you might want to revisit this

ngirard commented 3 years ago

@kkom: I submitted last year a working PR that allowed GitHub Actions to make precompiled binaries, and it was rejected with the following excuse:

I don't think that there is enough demand for binaries for this tool to make it worth the time spent reviewing and maintaining infrastructure to ship them.

That's hilarious. Yeah right folks, keep pretending you play nice by throwing some code to a GitHub Repo, but don't spend an extra dime making it actually usable and valuable to people. Keep going !

kkom commented 3 years ago

A workaround that works for my use case is to just build an ad-hoc generic script to publish various tools to Docker Hub as I need them, it's actually pretty simple: https://github.com/kkom/tools-docker

See the PR where I added fastmod (and actually the whole setup too): https://github.com/kkom/tools-docker/pull/1

ngirard commented 3 years ago

@kkom Well then, we're both perfectly capable of packaging and running this software by ourselves, but this is not the point here. The point is that some packaging is provided upstream, so people can benefit from it.