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

Support for R language #59

Closed
lorenzwalthert opened this issue May 30, 2021 · 5 comments · Fixed by #80
Closed

Support for R language #59

lorenzwalthert opened this issue May 30, 2021 · 5 comments · Fixed by #80

Comments

@lorenzwalthert
Copy link
Contributor

Now that R is supported in pre-commit, it should not take the world to make it work on pre-comit.ci (gauged from the line diff in #31). Should I follow that PR for an implementation?

@lorenzwalthert lorenzwalthert changed the title Support for R as a language Support for R language May 30, 2021
@asottile
Copy link
Member

I'm currently working on making languages easier to add and less impactful to autoscaling -- the current approach of having everything always in the image makes it difficult to be performant. I'm planning to do something like individual language bundles instead of a monolithic mega-image but I haven't finished the work there.

if you start a PR though it'll still be helpful in the new world, but will likely need some small amount of refactoring

@lorenzwalthert
Copy link
Contributor Author

I looked at the code and I wondered what reasons there were against making one image pre language... Do you have any ETA on that refactoring?

@asottile
Copy link
Member

one image per language doesn't work -- a pre-commit config may reference many languages

I don't have an ETA at the moment unfortunately

@asottile
Copy link
Member

ok! I now have a way for languages to not impact the scaling time

the tl;dr is a language must be exactly two instructions: and ENV line which sets up the environment variables for that language, immediately followed by a RUN line which does echo 'lang: ...'. there's currently a single example of this for swift, I will be porting some of the other languages to be deferred in this way as well to make scaling even faster. the RUN command should install everything into /opt/${lang} and basically use that as a prefix environment

let me know if you'd like some help with getting r set up in this way!

@lorenzwalthert
Copy link
Contributor Author

Thanks, I filed #80 to propose a concrete implementation. Also, I saw you updated the README to that effect. Maybe it's worth also pointing out there that a test should be added (and how). I followed the Swift example for #80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants