π§βπ» devcontainer for debugging with Ruby 2.5#272
Conversation
kou
left a comment
There was a problem hiding this comment.
(I'm not familiar with devcontainer...)
| // Features to add to the dev container. More info: https://containers.dev/features. | ||
| "features": { | ||
| "./apt-install": {} | ||
| }, |
There was a problem hiding this comment.
Do we need this?
It seems that install.sh installs needless packages.
There was a problem hiding this comment.
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.
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.
I think that all packages are needless because:
- We don't need to build CRuby (
ruby:2.5-busteralready has built CRuby) - We don't need JRuby (We should use separated
jrubyimage 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.
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.
I will remove the apt install script and see if that works.
There was a problem hiding this comment.
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.
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. |
|
@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
Uh oh!
There was an error while loading. Please reload this page.