stack_frames 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yaml +6 -0
- data/.github/workflows/ci.yml +5 -5
- data/.github/workflows/cibuildgem.yaml +87 -0
- data/.ruby-version +1 -0
- data/ext/stack_frames/buffer.c +1 -1
- data/ext/stack_frames/extconf.rb +1 -1
- data/ext/stack_frames/frame.c +1 -1
- data/ext/stack_frames/stack_frames.c +1 -1
- data/lib/stack_frames/version.rb +1 -1
- data/lib/stack_frames.rb +7 -1
- data/stack_frames.gemspec +2 -0
- metadata +7 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afcf2134a0bc1e04814de2e342d64e772475cccf3e6c353d0787994436e198d7
|
|
4
|
+
data.tar.gz: 49e82cb24b8f4b4eb2cac269862853e4993873338a9516597a37d41e388f5b25
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 616775cb67ca047e70bbe217b25c678cfe3af03bbe343bcd4e94a83f48868ea1ad0c487f39227dfa1506f34c998a18eca0fd4548a62cdcf9a42589dbd7a81cd6
|
|
7
|
+
data.tar.gz: 1428dedb8cce7cc6e5df0592a931e649c7db2255935708ba8f3691c6590a66cbabbf08f1726b75f7a130300f03f45cda61e5bc690f110b85b9a0a3962a690285
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -14,10 +14,11 @@ jobs:
|
|
|
14
14
|
'2.7',
|
|
15
15
|
'3.0',
|
|
16
16
|
'3.1',
|
|
17
|
+
'3.2',
|
|
17
18
|
]
|
|
18
19
|
steps:
|
|
19
|
-
- uses: actions/checkout@v2
|
|
20
|
-
- uses: ruby/setup-ruby@v1
|
|
20
|
+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
|
|
21
|
+
- uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
|
|
21
22
|
with:
|
|
22
23
|
ruby-version: ${{ matrix.ruby }}
|
|
23
24
|
bundler-cache: true
|
|
@@ -26,10 +27,9 @@ jobs:
|
|
|
26
27
|
valgrind:
|
|
27
28
|
runs-on: ubuntu-latest
|
|
28
29
|
steps:
|
|
29
|
-
- uses: actions/checkout@v2
|
|
30
|
-
- uses: ruby/setup-ruby@v1
|
|
30
|
+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
|
|
31
|
+
- uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
|
|
31
32
|
with:
|
|
32
|
-
ruby-version: '3.1'
|
|
33
33
|
bundler-cache: true
|
|
34
34
|
- run: sudo apt-get install -y valgrind
|
|
35
35
|
- run: bundle exec rake test:valgrind
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: "Package and release gems with precompiled binaries"
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
inputs:
|
|
5
|
+
release:
|
|
6
|
+
description: "If the whole build passes on all platforms, release the gems on RubyGems.org"
|
|
7
|
+
required: false
|
|
8
|
+
type: boolean
|
|
9
|
+
default: false
|
|
10
|
+
jobs:
|
|
11
|
+
compile:
|
|
12
|
+
timeout-minutes: 20
|
|
13
|
+
name: "Cross compile the gem on different ruby versions"
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os: ["macos-latest", "ubuntu-22.04"]
|
|
17
|
+
runs-on: "${{ matrix.os }}"
|
|
18
|
+
steps:
|
|
19
|
+
- name: "Checkout code"
|
|
20
|
+
uses: "actions/checkout@v5"
|
|
21
|
+
- name: "Setup Ruby"
|
|
22
|
+
uses: "ruby/setup-ruby@v1"
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: "3.1.7"
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
- name: "Run cibuildgem"
|
|
27
|
+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
|
|
28
|
+
with:
|
|
29
|
+
step: "compile"
|
|
30
|
+
test:
|
|
31
|
+
timeout-minutes: 20
|
|
32
|
+
name: "Run the test suite"
|
|
33
|
+
needs: compile
|
|
34
|
+
strategy:
|
|
35
|
+
matrix:
|
|
36
|
+
os: ["macos-latest", "ubuntu-22.04"]
|
|
37
|
+
rubies: ["3.1", "3.2", "3.3", "3.4"]
|
|
38
|
+
type: ["cross", "native"]
|
|
39
|
+
runs-on: "${{ matrix.os }}"
|
|
40
|
+
steps:
|
|
41
|
+
- name: "Checkout code"
|
|
42
|
+
uses: "actions/checkout@v5"
|
|
43
|
+
- name: "Setup Ruby"
|
|
44
|
+
uses: "ruby/setup-ruby@v1"
|
|
45
|
+
with:
|
|
46
|
+
ruby-version: "${{ matrix.rubies }}"
|
|
47
|
+
bundler-cache: true
|
|
48
|
+
- name: "Run cibuildgem"
|
|
49
|
+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
|
|
50
|
+
with:
|
|
51
|
+
step: "test_${{ matrix.type }}"
|
|
52
|
+
install:
|
|
53
|
+
timeout-minutes: 5
|
|
54
|
+
name: "Verify the gem can be installed"
|
|
55
|
+
needs: test
|
|
56
|
+
strategy:
|
|
57
|
+
matrix:
|
|
58
|
+
os: ["macos-latest", "ubuntu-22.04"]
|
|
59
|
+
runs-on: "${{ matrix.os }}"
|
|
60
|
+
steps:
|
|
61
|
+
- name: "Setup Ruby"
|
|
62
|
+
uses: "ruby/setup-ruby@v1"
|
|
63
|
+
with:
|
|
64
|
+
ruby-version: "3.4.7"
|
|
65
|
+
- name: "Run cibuildgem"
|
|
66
|
+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
|
|
67
|
+
with:
|
|
68
|
+
step: "install"
|
|
69
|
+
release:
|
|
70
|
+
environment: release
|
|
71
|
+
permissions:
|
|
72
|
+
id-token: write
|
|
73
|
+
contents: read
|
|
74
|
+
timeout-minutes: 5
|
|
75
|
+
if: ${{ inputs.release }}
|
|
76
|
+
name: "Release all gems with RubyGems"
|
|
77
|
+
needs: install
|
|
78
|
+
runs-on: "ubuntu-latest"
|
|
79
|
+
steps:
|
|
80
|
+
- name: "Setup Ruby"
|
|
81
|
+
uses: "ruby/setup-ruby@v1"
|
|
82
|
+
with:
|
|
83
|
+
ruby-version: "3.4.7"
|
|
84
|
+
- name: "Run cibuildgem"
|
|
85
|
+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
|
|
86
|
+
with:
|
|
87
|
+
step: "release"
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.3.0
|
data/ext/stack_frames/buffer.c
CHANGED
|
@@ -33,7 +33,7 @@ static size_t buffer_memsize(const void *ptr)
|
|
|
33
33
|
return sizeof(buffer_t);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const rb_data_type_t buffer_data_type = {
|
|
36
|
+
static const rb_data_type_t buffer_data_type = {
|
|
37
37
|
"stack_frames_buffer",
|
|
38
38
|
{ buffer_mark, buffer_free, buffer_memsize, },
|
|
39
39
|
NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
|
data/ext/stack_frames/extconf.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
require 'mkmf'
|
|
2
|
-
$CFLAGS << ' -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers'
|
|
2
|
+
$CFLAGS << ' -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden'
|
|
3
3
|
$CFLAGS << ' -Werror' if ENV['STACK_FRAMES_DEV']
|
|
4
4
|
create_makefile("stack_frames/stack_frames")
|
data/ext/stack_frames/frame.c
CHANGED
|
@@ -19,7 +19,7 @@ static size_t frame_memsize(const void *ptr)
|
|
|
19
19
|
return sizeof(frame_t);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const rb_data_type_t frame_data_type = {
|
|
22
|
+
static const rb_data_type_t frame_data_type = {
|
|
23
23
|
"stack_frames_frame",
|
|
24
24
|
{ frame_mark, RUBY_DEFAULT_FREE, frame_memsize, },
|
|
25
25
|
NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
|
data/lib/stack_frames/version.rb
CHANGED
data/lib/stack_frames.rb
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'stack_frames/version'
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
begin
|
|
6
|
+
ruby_version = /(\d+\.\d+)/.match(RUBY_VERSION)
|
|
7
|
+
require "stack_frames/#{ruby_version}/stack_frames"
|
|
8
|
+
rescue LoadError
|
|
9
|
+
require "stack_frames/stack_frames"
|
|
10
|
+
end
|
|
5
11
|
|
|
6
12
|
StackFrames::Frame.singleton_class.class_eval do
|
|
7
13
|
private(:new)
|
data/stack_frames.gemspec
CHANGED
|
@@ -26,6 +26,8 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
27
27
|
spec.require_paths = ["lib"]
|
|
28
28
|
|
|
29
|
+
spec.required_ruby_version = ">= 2.6.0"
|
|
30
|
+
|
|
29
31
|
spec.add_development_dependency "bundler"
|
|
30
32
|
spec.add_development_dependency "rake", "~> 13.0"
|
|
31
33
|
spec.add_development_dependency 'rake-compiler', '~> 1.0'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stack_frames
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dylan Thacker-Smith
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-12-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -102,9 +102,12 @@ extensions:
|
|
|
102
102
|
- ext/stack_frames/extconf.rb
|
|
103
103
|
extra_rdoc_files: []
|
|
104
104
|
files:
|
|
105
|
+
- ".github/dependabot.yaml"
|
|
105
106
|
- ".github/workflows/ci.yml"
|
|
107
|
+
- ".github/workflows/cibuildgem.yaml"
|
|
106
108
|
- ".github/workflows/cla.yml"
|
|
107
109
|
- ".gitignore"
|
|
110
|
+
- ".ruby-version"
|
|
108
111
|
- CODE_OF_CONDUCT.md
|
|
109
112
|
- CONTRIBUTING.md
|
|
110
113
|
- Gemfile
|
|
@@ -138,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
138
141
|
requirements:
|
|
139
142
|
- - ">="
|
|
140
143
|
- !ruby/object:Gem::Version
|
|
141
|
-
version:
|
|
144
|
+
version: 2.6.0
|
|
142
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
146
|
requirements:
|
|
144
147
|
- - ">="
|
|
145
148
|
- !ruby/object:Gem::Version
|
|
146
149
|
version: '0'
|
|
147
150
|
requirements: []
|
|
148
|
-
rubygems_version: 3.3.
|
|
151
|
+
rubygems_version: 3.3.27
|
|
149
152
|
signing_key:
|
|
150
153
|
specification_version: 4
|
|
151
154
|
summary: Zero allocation backtraces using MRI's profile frames API
|