-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update to use Minitest 5.15.0 #217
Conversation
2nd commit allows TestUp to load with SU 2017. |
Thanks for looking into this. I'll have to check out the branch and run some tests on various SU versions. |
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.
Would also have to update README.me, but I can have a look at that afterwards.
@@ -2,6 +2,7 @@ | |||
# License:: The MIT License (MIT) | |||
# Original Author:: Adam Karkkainen | |||
|
|||
if Geom.const_defined? :Point2d |
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.
What are these conditionals for?
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, for running on older SketchUp versions?
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, for running on older SketchUp versions?
Yes. I wanted to see if it worked with Ruby 2.2, so I tried SU 2017.
The '2d' objects were new with SU 2018, JFYI, doc's refer to Layout (not SU) in their minimum version item.
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.
Yea, the 2d classes was introduced because of LayOut. SketchUp never really used them. I think we might have introduced some usage of them later on though.
@@ -9,7 +9,9 @@ | |||
|
|||
# TODO: Defer this to a point so it doesn't happen during SketchUp startup. | |||
require 'testup/gem_helper' | |||
TestUp::GemHelper.require('minitest', 'minitest', version: '5.4.3') | |||
|
|||
# Minitest 5.15.0 is compatible with Ruby '>= 2.2, < 4.0', released 15-Dec-2021 |
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.
With that the .rubocop.yml
should update TargetSketchUpVersion
and TargetRubyVersion
.
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 wasn't sure what you wanted to do, I don't think I have a complete set of old Ruby 2.2. SU versions.
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 can have a look at the rubocop config.
I just realized you had a PR from 2018 related to this (#104). Never got around to dig into that one. (Sorry!) |
Wondering if it's worth pulling in the fix I have for 5.4.3: Making use of the expected gem version when trying to activate it makes sense, right? |
See the third commit. This used the pre-existing Minitest from a new SU version, and installed 5.15.0 using SU 2023, even though it had Minitest 5.4.3 installed from an older TestUp. So, if the SU version has a version of Minitest installed that is 5.15.0 or later, activate it, otherwise, install it. Without the change in the third commit, it would activate any version of Minitest... |
I thought I'd check the node version issue. This does build with Node.js 16. See: https://github.com/MSP-Greg/testup-2/actions/runs/7403666596 I installed the artifact on the new SU version, and it seems to work. Node.js 18 failed. Node.js 10 is rather old. |
It's old, yes. But I don't have the time right now to deal with Your PR appear to be stuck from a point where I was working on the GitHub actions. If you rebase to the tip of main you'll get the latest actions working. https://github.com/SketchUp/testup-2/actions |
@@ -14,7 +14,7 @@ module GemHelper | |||
def self.require(gem_name, filename, version: Gem::Requirement.default) | |||
Kernel.require 'rubygems' | |||
begin | |||
gem gem_name | |||
gem gem_name, ">=#{version}" |
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.
Ah, nice. didn't realize you could use a flexible version here.
1a2c7d5
to
056f265
Compare
npm updates are different than node.js updates. Feel free to try the extension. It builds, and it seems to work, except for some issues running tests in the SU console. Didn't have time to check on SU 2022, which doesn't have the
Sorry, I was working in the branch with the node update (which was rebased), pushed the rebase here |
I tested SU2017 and that worked fine.
What issues is that?
That's related to "running tests in the SU console"? |
For instance, when running Minitest without Not sure how to get SU console output matching the log file (setting |
Right, but that's a bug in SketchUp SU2023.1, right? Not a result of the new Minitest version? |
I'm seeing the console result issue in SU2023.1 with Minitest 5.4.3, but not in earlier versions. So that's an unrelated issue. I think this is ready to merge. But I'll run some extra tests. Will probably wait until monday. |
Works for me. I should be around this weekend. I got it running in SU 2022. Using the menu, with 'Run tests in Ruby Console' checked and 'Verbose Console Tests' unchecked, I get the 'line of dots', as expected. When I check 'Verbose Console Tests', there's no change. I'll try to have a look at it, if you find a fix. please let me know. |
I'll be looking into the new-line Ruby Console issue on Windows next week. |
For this PR, I think I worked from a release, and copied the changes back into the repo. Now, I installed nodejs 16.20.2, built it, and I've got the repo symlinked into SU 2017 & 2022. With some changes, both run correctly in the console with 'Verbose Console Tests' set on or off. They also correctly run the tests in the GUI. I can add the commits to this, or save for another PR after this is merged. |
Added one commit which speeds up the local install of the included gem file. EDIT: tested with SU 2017 & SU 2022 |
@@ -58,7 +58,8 @@ def self.install(gem_name, version = Gem::Requirement.default) | |||
if local_path | |||
puts '> Installing from local copy...' | |||
puts "> #{local_path}" | |||
Gem.install(local_path) | |||
Gem.install(local_path, nil, {domain: :local}) |
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.
This domain: local
options, how far back is that supported?
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.
Ruby 2.2, SU 2017. It doesn't exist in Ruby 2.0, not sure about 2.1
|
I can take care of the version guard, README etc. |
Tried with new version and SU 2020 (Ruby 2.5.5), seemed to work.
EDIT: Added 2nd commit to fix SU 2017 seemed to work, had to rename
TC_Geom_Point2d.rb
,TC_Geom_Transformation2d.rb
, andTC_Geom_Vector2d.rb
Please test, as I'm not that familiar with TestUp...