Skip to content

Commit

Permalink
Address PR comments, and undo simplecov patch
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahchen6 committed Oct 30, 2024
1 parent e976b17 commit b30616e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
bundler: 2.3.26 # needed to fix issue with steep on Ruby 3.0/3.1
- run: bundle install
- if: ${{ matrix.ruby == '3.4' }}
run: gem update --system 3.5.21
run: gem update --system 3.5.21 # the latest gem causes 3.4 macos failues
- run: bundle exec rake spec:main
10 changes: 3 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ gem 'rspec_junit_formatter', '>= 0.5.1'
# Merging branch coverage results does not work for old, unsupported rubies and JRuby
# We have a fix up for review, https://github.com/simplecov-ruby/simplecov/pull/972,
# but given it only affects unsupported version of Ruby, it might not get merged.
if RUBY_VERSION.start_with?('3.4.')
gem 'simplecov'
else
gem 'simplecov', git: 'https://github.com/DataDog/simplecov', ref: '3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db'
end
gem 'simplecov', git: 'https://github.com/DataDog/simplecov', ref: '3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db'

gem 'simplecov-cobertura', '~> 2.1.0' # Used by codecov

Expand Down Expand Up @@ -104,5 +100,5 @@ gem 'ffi', '~> 1.16.3', require: false

# Ruby 3.4 should be supported by strscan v3.1.1. However, the latest release of strscan is v3.1.0.
#
# TODO: Remove this v3.1.0 requirement once v3.1.1 is released.
gem 'strscan', '3.1.0' if RUBY_VERSION.start_with?('3.4.')
# TODO: Remove this once v3.1.1 is released.
gem 'strscan', git: 'https://github.com/ruby/strscan' if RUBY_VERSION.start_with?('3.4.')
3 changes: 2 additions & 1 deletion spec/datadog/core/environment/execution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ def test_it_does_something_useful
Open3.capture3('ruby', stdin_data: script)
end

skip('DEBUG')
# Ruby 3.4 outputs an exception instead of the information to be asserted because of the forked process.
pending('Pending for Ruby 3.4.') if RUBY_VERSION.start_with?('3.4.')
expect(err).to include('ACTUAL:true')
end
end
Expand Down
2 changes: 2 additions & 0 deletions spec/datadog/core/error_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ def call
expect(error.message).to eq('wrapper layer')

# Outer-most error first, inner-most last
# Ruby 3.4 adjusts the format of error messages and Hash#inspect renderings
# https://www.ruby-lang.org/en/news/2024/10/07/ruby-3-4-0-preview2-released/
wrapper_error_message = /in.*wrapper': wrapper layer \(RuntimeError\)/
wrapper_caller = /from.*in ['`]call'/
middle_error_message = /in.*middle': middle cause \(RuntimeError\)/
Expand Down

0 comments on commit b30616e

Please sign in to comment.