Skip to content
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

Drop debugging support in preference of validated builds against Ruby 2.7.x -> 3.2.x #292

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release-on-pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
RUBYGEMS_PASS: '${{ secrets.RUBYGEMS_PASS }}'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.7.x
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2

- name: Setup git
run: |
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
name: tests

on: [push, pull_request]

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
name: Run test on ${{ matrix.os }}
name: Run UTs on ${{ matrix.ruby_version }} + ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
ruby_version: ['2.7', '3.0', '3.1', '3.2']
fail-fast: false

steps:

- uses: actions/checkout@v3
Expand All @@ -17,23 +25,25 @@ jobs:
run: |
node -e "console.log(JSON.stringify(process.env, null, ' '))"

- name: Set up Ruby 2.7.x
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: ${{ matrix.ruby_version }}

- name: Run tests
run: |
bundle install
bundle exec rake spec

fts:
name: Run FTs on ${{ matrix.os }}
name: Run FTs on ${{ matrix.ruby_version }} + ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: tests
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
ruby_version: ['2.7', '3.0', '3.1', '3.2']
fail-fast: false

steps:
- uses: actions/checkout@v3
Expand All @@ -54,10 +64,10 @@ jobs:
echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV
echo "LOCAL_RUBY_PLUGIN_PATH=$(pwd)" >> $GITHUB_ENV

- name: Set up Ruby 2.7.x
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: ${{ matrix.ruby_version }}

- name: Setup go 1.20.x
uses: actions/setup-go@v4
Expand Down Expand Up @@ -90,16 +100,18 @@ jobs:
- uses: actions/upload-artifact@master
if: failure() || cancelled()
with:
name: fts-logs-${{ matrix.os }}
name: fts-logs-${{ matrix.os }}-ruby-${{ matrix.ruby_version }}
path: gauge-tests/logs

lsp-tests:
name: Run lsp on ${{ matrix.os }}
name: Run lsp on ${{ matrix.ruby_version }} + ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
ruby_version: ['2.7', '3.0', '3.1', '3.2']
fail-fast: false

steps:
- uses: actions/checkout@v3
Expand All @@ -120,10 +132,10 @@ jobs:
echo "RUBY_PLUGIN_BRANCH=$COMMIT_HASH" >> $GITHUB_ENV
echo "LOCAL_RUBY_PLUGIN_PATH=$(pwd)" >> $GITHUB_ENV

- name: Set up Ruby 2.7.x
- name: Set up Ruby ${{ matrix.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: ${{ matrix.ruby_version }}

- name: Setup go 1.20.x
uses: actions/setup-go@v4
Expand Down Expand Up @@ -155,5 +167,5 @@ jobs:
- uses: actions/upload-artifact@master
if: failure() || cancelled()
with:
name: lsp-logs-${{ matrix.os }}
name: lsp-logs-${{ matrix.os }}-ruby-${{ matrix.ruby_version }}
path: gauge-lsp-tests/logs
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.8
3.2.2
11 changes: 1 addition & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
PATH
remote: .
specs:
gauge-ruby (0.6.0)
debase (~> 0.2.5.beta2)
gauge-ruby (0.7.0)
grpc (~> 1.10, >= 1.10.0)
parser (>= 2.7, < 4.0)
ruby-debug-ide (>= 0.6, < 0.8)
ruby-protocol-buffers (= 1.6.1)
unparser (>= 0.5.0, < 0.7.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
debase (0.2.5.beta2)
debase-ruby_core_source (>= 0.10.12)
debase-ruby_core_source (3.2.1)
diff-lcs (1.5.0)
docile (1.4.0)
google-protobuf (3.23.3)
Expand Down Expand Up @@ -55,9 +49,6 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
ruby-debug-ide (0.7.3)
rake (>= 0.8.1)
ruby-protocol-buffers (1.6.1)
rubyzip (2.3.2)
simplecov (0.22.0)
docile (~> 1.1)
Expand Down
3 changes: 0 additions & 3 deletions gauge-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ Gem::Specification.new do |s|
s.homepage = "https://gauge.org"
s.files = Dir.glob("lib/**/*.rb")

s.add_runtime_dependency 'ruby-protocol-buffers', '1.6.1'
s.add_runtime_dependency 'parser', '>= 2.7', '< 4.0'
s.add_runtime_dependency 'unparser', '>= 0.5.0', '< 0.7.0'
s.add_runtime_dependency 'ruby-debug-ide', '>=0.6', '<0.8'
s.add_runtime_dependency 'debase', '~>0.2.5.beta2'
s.add_runtime_dependency 'grpc', '~> 1.10', '>= 1.10.0'
s.add_development_dependency 'grpc-tools', '~> 1.10', '>= 1.10.0'
s.required_ruby_version = ">= 2.7" if s.respond_to? :required_ruby_version=
Expand Down
18 changes: 1 addition & 17 deletions lib/executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
* Licensed under the Apache License, Version 2.0
* See LICENSE.txt in the project root for license information.
=end
require 'ruby-debug-ide'
require_relative 'gauge'

ATTACH_DEBUGGER_EVENT = 'Runner Ready for Debugging'

module Gauge
class DebugOptions
attr_accessor :host, :port, :notify_dispatcher, :socket_path, :skip_wait_for_start
Expand All @@ -16,10 +13,9 @@ class DebugOptions
# @api private
module Executor
def self.load_steps(dir)
start_debugger
Dir["#{dir}/**/*.rb"].each do |x|
begin
GaugeLog.debug "Loading step implemetations from #{x} dirs"
GaugeLog.debug "Loading step implementations from #{x} dirs"
ENV['GAUGE_STEP_FILE'] = x
require x
rescue Exception => e
Expand All @@ -28,18 +24,6 @@ def self.load_steps(dir)
end
end

def self.start_debugger
if ENV['DEBUGGING']
options = DebugOptions.new
options.host = '127.0.0.1'
options.port = ENV['DEBUG_PORT'].to_i
options.notify_dispatcher = false
options.skip_wait_for_start = false
GaugeLog.info ATTACH_DEBUGGER_EVENT
Debugger.prepare_debugger(options)
end
end

def self.execute_step(step, args)
si = MethodCache.get_step_info step
if args.size == 1
Expand Down
1 change: 0 additions & 1 deletion lib/gauge_runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See LICENSE.txt in the project root for license information.
=end
require 'socket'
require 'protocol_buffers'
require 'grpc'

require_relative 'messages_pb'
Expand Down
1 change: 0 additions & 1 deletion notice.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
| Dependency Name | Copyright Information | Description | Repo URL | License Type | License URL |
|-----------------------|---------------------------------------|---------------------------------------------|------------------------------------------------------|--------------|------------------------------------------------------------------------------------|
| ruby-protocol-buffers | Copyright (c) 2009, Decho Corporation | implementation of Protocol Buffers for Ruby | https://github.com/codekitchen/ruby-protocol-buffers | BSD-3-Clause | https://raw.githubusercontent.com/codekitchen/ruby-protocol-buffers/master/LICENSE |
| parser | Copyright (c) Ryan Davis, seattle.rb | Ruby parser | https://github.com/whitequark/parser | MIT | https://github.com/whitequark/parser/blob/master/LICENSE.txt |
| unparser | Copyright (c) 2013 Markus Schirp | Ruby unparser | https://github.com/mbj/unparser | MIT | https://github.com/mbj/unparser/blob/main/LICENSE |
| grpc | Copyright 2016, Google Inc. | gRPC – An RPC library | https://github.com/grpc/grpc | Apache-2 | https://github.com/grpc/grpc/blob/master/LICENSE |
2 changes: 1 addition & 1 deletion ruby.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id" : "ruby",
"version" : "0.6.0",
"version" : "0.7.0",
"description": "ruby support for gauge",
"install": {
"windows": [],
Expand Down