-
Notifications
You must be signed in to change notification settings - Fork 51
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
CC-1188: add crystal dependency resolution #192
base: main
Are you sure you want to change the base?
Conversation
After a lot of searching, added this library to the list of dependencies. |
dockerfiles/crystal-1.12.Dockerfile
Outdated
RUN mkdir -p /app-cached/ | ||
RUN if [ -d "/app/lib" ]; then mv /app/lib /app-cached/lib; fi | ||
|
||
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && crystal build -p -s -t -o server app/main.cr && sed -i '/^crystal/ s/^/# /' ./spawn_redis_server.sh" > /codecrafters-precompile.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not pertinent to this PR, but just wanted to note: looks like this pattern is becoming commonplace in a lot of our languages. Need to find a better solution. This commenting stuff feels wonky - if a user edits the file it isn't going to be clear to them that there's a hidden script that relies on the file's structure.
@@ -0,0 +1,2 @@ | |||
lib/ | |||
server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Binaries typically get placed in bin/
or so for most languages - what's the default that Crystal uses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/ is where the dependencies are stored.
And server is the final artifact. (We are passing this name with the -o flag).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No other build artifacts would be there in the /app dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions added
@ryan-gang let's spend some time today thinking about how we can avoid the precompile commenting situation, and how we can make this more transparent to the user (not related to this PR per-se, just a general note) |
Gonna keep this on hold for a bit - will revisit soon |
No description provided.