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

Build: use prebuilt alpine version of nim for test-runner #117

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ynfle
Copy link
Contributor

@ynfle ynfle commented Dec 14, 2021

This uses nimlang/nim:1.6.0-alpine-regular to copy over the alpine
version of nim for the test-runner because it is already built and
doesn't have to be rebuilt on every CI test.

There are currently issues with this and I'll hopefully figure them out soon

Related to #116. The advantage of this route, is we don't have to maintain our nim base image (@ee7 is there any advantage to maintaining our own? It didn't seem like you are doing anything special in bin/install_nim.sh)

This uses `nimlang/nim:1.6.0-alpine-regular` to copy over the alpine
version of nim for the test-runner because it is already built and
doesn't have to be rebuilt on every CI test.
@ee7
Copy link
Member

ee7 commented Dec 23, 2021

is there any advantage to maintaining our own? It didn't seem like you are doing anything special in bin/install_nim.sh

I wouldn't say there are huge advantages, but there are at least these benefits:

  1. We can use koch -d:leanCompiler. It's more for making bootstrapping possible on memory-constrained devices, but it's probably also a marginal decrease in attack surface (there could be a security issue with docgen or JS codegen).
  2. We can bump the Alpine (and therefore gcc) version that builds Nim, even when Nim itself didn't get a new release. It feels better if we use the same Alpine version to build Nim, to build the test runner, and to build the user's code.
  3. We can minimize the Nim installation size in our base image, not in exercism/nim-test-runner (I wrote this part so that we don't include some larger directories like compiler/doc/tests).
  4. At the time of the creation of this post, the nimlang Docker image is not officially maintained by the Nim core team.

I'd suggest that we use exercism/nim-docker-base for now - does that work for you? I'd be fine with reconsidering if it becomes a significant maintenance burden.

@ynfle
Copy link
Contributor Author

ynfle commented Dec 23, 2021

So I'm going to close this PR, but we can revisit it at a future date, perhaps when @ErikSchierboom is back in the virtual office

@ErikSchierboom
Copy link
Member

Let's discuss this once I'm back (next week).

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

Successfully merging this pull request may close these issues.

3 participants