-
Notifications
You must be signed in to change notification settings - Fork 79
π§βπ» devcontainer for debugging with Ruby 2.5 #272
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
base: master
Are you sure you want to change the base?
Conversation
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.
(I'm not familiar with devcontainer...)
.devcontainer/devcontainer.json
Outdated
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"./apt-install": {} | ||
}, |
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.
Do we need this?
It seems that install.sh
installs needless packages.
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.
It very well could, but I'm not sure which they are, especially after upgrading to not-slim. The packages can be trimmed later too. It was my goal that this be the minimal set to install Ruby, but I may have collected too many.
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.
Oh, and the reason there is a Java package is I am trying to additionally test everything against JRuby going forward.
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.
I think that all packages are needless because:
- We don't need to build CRuby (
ruby:2.5-buster
already has built CRuby) - We don't need JRuby (We should use separated
jruby
image instead)
BTW, how can I test the current configuration on local...? I'm not a Visual Studio Code user. So I want to test without Visual Studio Code...
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.
I have only done it from within RubyMine (in which case you just right click on the file to start the container with a local RubyMine inside the container and a cross mounted project).
But this is how I would do it from the CLi:
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.
I will remove the apt install script and see if that works.
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.
I've modified the feature to setup bundler instead of installing apt packages.
root@d5a0bdd30fe3:/IdeaProjects/rexml# bundle -v
Bundler version 2.3.27
root@d5a0bdd30fe3:/IdeaProjects/rexml# bundle exec rake
/usr/local/bin/ruby test/run.rb
Loaded suite test
Started
Finished in 4.109169655 seconds.
-----------------------------------------------------------------------------------------------------------
716 tests, 2170 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-----------------------------------------------------------------------------------------------------------
174.24 tests/s, 528.09 assertions/s
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.
In doing so I noticed that this gem has bundler as a dependency in the Gemfile, and that's not a good idea, unless the gem is literally something that hacks on bundler. This gem only uses bundler in the normal, vanilla, way, so it should not have bundler, even as a development dependency. Added as #276
@kou This PR is ready for review.
@kou Ready for review again. |
cf8bd52
to
739bbba
Compare
@kou this is ready for review. The Gemfile for Ruby 2.5 is now copied fresh each time the devcontainer is run, and is gitignored. |
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
- Add bundle install - Remove extra comments
2fb8881
to
5f58340
Compare
Please help me support open source by sponsoring me - @pboling