expressir 1.2.11-x64-mingw-ucrt → 1.3.0.pre.1-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +14 -7
- data/.github/workflows/release.yml +7 -8
- data/Rakefile +1 -1
- data/expressir.gemspec +1 -1
- data/lib/expressir/express/3.1/express_parser.so +0 -0
- data/lib/expressir/express/3.2/express_parser.so +0 -0
- data/lib/expressir/express/extension.rb +30 -0
- data/lib/expressir/express/parser.rb +1 -6
- data/lib/expressir/express/visitor.rb +1 -8
- data/lib/expressir/version.rb +1 -1
- data/rakelib/cross-ruby.rake +36 -21
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7faa48dfb03fde442f8c8c99875cfdc876a1309de541aeb07e3f68fcff2c20cc
|
4
|
+
data.tar.gz: a001487703d2d93a75ef7c3f5ba3cae24865e8f2098b0c022bcc328ea64a3a2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fde946543ce563d20b1f72dbbe6a5f023c0873e2e6cf1fd53ddb50ab068013410506e0278e48e7b95b14b3a0dc21d818dc085f20c128f9038697f68c897f724
|
7
|
+
data.tar.gz: e178fe1edda9bc9c2b6828eb01d3141cede3a26f0520f508e5b1a1e3fcf30aa2b7ea6dcc7eefc1b96ec47566e2221f60639dfa51a1ddb9cb95594abedf9eda9c
|
data/.github/workflows/rake.yml
CHANGED
@@ -3,7 +3,14 @@ name: rake
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches: [ master, main ]
|
6
|
+
paths-ignore:
|
7
|
+
- 'docs/**'
|
8
|
+
- '**.adoc'
|
9
|
+
- '**.md'
|
10
|
+
- .github/workflows/alpine.yml
|
11
|
+
- .github/workflows/release.yml
|
6
12
|
pull_request:
|
13
|
+
workflow_dispatch:
|
7
14
|
|
8
15
|
concurrency:
|
9
16
|
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
|
@@ -114,7 +121,7 @@ jobs:
|
|
114
121
|
strategy:
|
115
122
|
fail-fast: false
|
116
123
|
matrix:
|
117
|
-
|
124
|
+
platform: [ linux-gnu, windows, darwin ]
|
118
125
|
steps:
|
119
126
|
- name: Checkout
|
120
127
|
uses: actions/checkout@v4
|
@@ -141,12 +148,12 @@ jobs:
|
|
141
148
|
sudo swapon --all --verbose
|
142
149
|
|
143
150
|
- name: Build gem with native extension
|
144
|
-
run: bundle exec rake gem:${{ matrix.
|
151
|
+
run: bundle exec rake gem:${{ matrix.platform }}
|
145
152
|
|
146
153
|
- name: Package gem with native extension
|
147
154
|
uses: actions/upload-artifact@v3
|
148
155
|
with:
|
149
|
-
name: pkg-${{ matrix.
|
156
|
+
name: pkg-${{ matrix.platform }}
|
150
157
|
path: pkg/*.gem
|
151
158
|
|
152
159
|
verify-ruby:
|
@@ -227,8 +234,8 @@ jobs:
|
|
227
234
|
ruby bin/rspec
|
228
235
|
cat .rspec_status || echo ".rspec_status was not found"
|
229
236
|
|
230
|
-
verify-linux:
|
231
|
-
name: verify Linux binary gem on ruby-${{ matrix.ruby }}
|
237
|
+
verify-linux-gnu:
|
238
|
+
name: verify Linux (gnu) binary gem on ruby-${{ matrix.ruby }}
|
232
239
|
needs: pack
|
233
240
|
runs-on: ubuntu-latest
|
234
241
|
strategy:
|
@@ -252,11 +259,11 @@ jobs:
|
|
252
259
|
- name: Download packaged gem
|
253
260
|
uses: actions/download-artifact@v3
|
254
261
|
with:
|
255
|
-
name: pkg-linux
|
262
|
+
name: pkg-linux-gnu
|
256
263
|
path: pkg
|
257
264
|
|
258
265
|
- name: Install binary gem
|
259
|
-
run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
|
266
|
+
run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM")-gnu.gem
|
260
267
|
|
261
268
|
- name: Verify
|
262
269
|
run: |
|
@@ -30,8 +30,8 @@ jobs:
|
|
30
30
|
|
31
31
|
- if: ${{ github.event_name == 'workflow_dispatch' }} # unfortunatelly cannot keep this condition on job level
|
32
32
|
run: |
|
33
|
-
git config user.name github-actions
|
34
|
-
git config user.email github-actions@github.com
|
33
|
+
git config --global user.name github-actions
|
34
|
+
git config --global user.email github-actions@github.com
|
35
35
|
gem install gem-release
|
36
36
|
gem bump --version ${{ github.event.inputs.next_version }} --tag --push
|
37
37
|
|
@@ -41,12 +41,11 @@ jobs:
|
|
41
41
|
strategy:
|
42
42
|
fail-fast: false
|
43
43
|
matrix:
|
44
|
-
|
44
|
+
platform: [ linux-gnu, windows, darwin ]
|
45
45
|
steps:
|
46
46
|
- uses: actions/checkout@v4
|
47
47
|
with:
|
48
48
|
submodules: recursive
|
49
|
-
ref: main # https://github.com/actions/checkout/issues/439#issuecomment-830862188
|
50
49
|
|
51
50
|
- uses: ruby/setup-ruby@master
|
52
51
|
with:
|
@@ -59,7 +58,7 @@ jobs:
|
|
59
58
|
# build gem WITHOUT pre-built native extension
|
60
59
|
- run: gem build expressir.gemspec
|
61
60
|
|
62
|
-
- if: matrix.
|
61
|
+
- if: matrix.platform == 'linux-gnu'
|
63
62
|
uses: actions/upload-artifact@v3
|
64
63
|
with:
|
65
64
|
name: pkg-ruby
|
@@ -74,11 +73,11 @@ jobs:
|
|
74
73
|
sudo swapon --all --verbose
|
75
74
|
|
76
75
|
# build gem WITH pre-built native extension
|
77
|
-
- run: bundle exec rake gem:${{ matrix.
|
76
|
+
- run: bundle exec rake gem:${{ matrix.platform }}
|
78
77
|
|
79
78
|
- uses: actions/upload-artifact@v3
|
80
79
|
with:
|
81
|
-
name: pkg-${{ matrix.
|
80
|
+
name: pkg-${{ matrix.platform }}
|
82
81
|
path: pkg/*.gem
|
83
82
|
|
84
83
|
publish:
|
@@ -92,7 +91,7 @@ jobs:
|
|
92
91
|
|
93
92
|
- uses: actions/download-artifact@v3
|
94
93
|
with:
|
95
|
-
name: pkg-linux
|
94
|
+
name: pkg-linux-gnu
|
96
95
|
path: pkg
|
97
96
|
|
98
97
|
- uses: actions/download-artifact@v3
|
data/Rakefile
CHANGED
data/expressir.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "expressir"
|
7
7
|
spec.version = Expressir::VERSION
|
8
8
|
spec.authors = ["Ribose Inc."]
|
9
|
-
spec.email = ["open.source@ribose.com
|
9
|
+
spec.email = ["open.source@ribose.com"]
|
10
10
|
|
11
11
|
spec.summary = "ISO EXPRESS parser and tools in Ruby."
|
12
12
|
spec.description = "Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set of Ruby tools for accessing ISO EXPRESS data models."
|
Binary file
|
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
begin
|
4
|
+
# native precompiled gems package shared libraries in <gem_dir>/lib/nokogiri/<ruby_version>
|
5
|
+
::RUBY_VERSION =~ /(\d+\.\d+)/
|
6
|
+
require_relative "#{Regexp.last_match(1)}/express_parser"
|
7
|
+
rescue LoadError => e
|
8
|
+
# if /musl/.match?(RUBY_PLATFORM)
|
9
|
+
# warn(<<~EOM)
|
10
|
+
#
|
11
|
+
# ERROR: It looks like you're trying to use Expressir as a precompiled native gem on a musl system.
|
12
|
+
#
|
13
|
+
# #{e.message}
|
14
|
+
#
|
15
|
+
# If that's the case, then please install Expressir via the `ruby` platform gem:
|
16
|
+
# gem install expressir --platform=ruby
|
17
|
+
# or:
|
18
|
+
# bundle config set force_ruby_platform true
|
19
|
+
#
|
20
|
+
#
|
21
|
+
# EOM
|
22
|
+
# raise e
|
23
|
+
# end
|
24
|
+
|
25
|
+
# use "require" instead of "require_relative" because non-native gems will place C extension files
|
26
|
+
# in Gem::BasicSpecification#extension_dir after compilation (during normal installation), which
|
27
|
+
# is in $LOAD_PATH but not necessarily relative to this file
|
28
|
+
require "expressir/express/express_parser"
|
29
|
+
end
|
30
|
+
|
@@ -1,9 +1,4 @@
|
|
1
|
-
|
2
|
-
RUBY_VERSION =~ /(\d+\.\d+)/
|
3
|
-
require_relative "#{$1}/express_parser"
|
4
|
-
rescue LoadError
|
5
|
-
require_relative "express_parser"
|
6
|
-
end
|
1
|
+
require_relative 'extension'
|
7
2
|
require 'expressir/express/visitor'
|
8
3
|
require 'expressir/express/resolve_references_model_visitor'
|
9
4
|
|
@@ -1,9 +1,4 @@
|
|
1
|
-
|
2
|
-
RUBY_VERSION =~ /(\d+\.\d+)/
|
3
|
-
require_relative "#{$1}/express_parser"
|
4
|
-
rescue LoadError
|
5
|
-
require_relative "express_parser"
|
6
|
-
end
|
1
|
+
require_relative 'extension'
|
7
2
|
require "expressir/model"
|
8
3
|
require "set"
|
9
4
|
|
@@ -31,8 +26,6 @@ require "set"
|
|
31
26
|
# - prevents segfault in ANTLR4 C++ runtime, not sure why they are caused
|
32
27
|
# - e.g. see visit_schema_decl
|
33
28
|
|
34
|
-
require 'objspace'
|
35
|
-
|
36
29
|
module Expressir
|
37
30
|
module Express
|
38
31
|
class Visitor < ::ExpressParser::Visitor
|
data/lib/expressir/version.rb
CHANGED
data/rakelib/cross-ruby.rake
CHANGED
@@ -2,7 +2,7 @@ require "rbconfig"
|
|
2
2
|
require "shellwords"
|
3
3
|
|
4
4
|
WINDOWS_PLATFORM_REGEX = /mingw|mswin/.freeze
|
5
|
-
|
5
|
+
LINUX_GNU_PLATFORM_REGEX = /linux-gnu/.freeze
|
6
6
|
DARWIN_PLATFORM_REGEX = /darwin/.freeze
|
7
7
|
GLIBC_MIN_VERSION = "2.17".freeze
|
8
8
|
|
@@ -15,8 +15,8 @@ CrossRuby = Struct.new(:version, :host) do
|
|
15
15
|
!!(platform =~ WINDOWS_PLATFORM_REGEX)
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
!!(platform =~
|
18
|
+
def linux_gnu?
|
19
|
+
!!(platform =~ LINUX_GNU_PLATFORM_REGEX)
|
20
20
|
end
|
21
21
|
|
22
22
|
def darwin?
|
@@ -59,10 +59,10 @@ CrossRuby = Struct.new(:version, :host) do
|
|
59
59
|
else
|
60
60
|
"x64-mingw32"
|
61
61
|
end
|
62
|
-
when
|
63
|
-
"x86_64-linux"
|
64
|
-
when
|
65
|
-
"aarch64-linux"
|
62
|
+
when "x86_64-linux-gnu"
|
63
|
+
"x86_64-linux-gnu"
|
64
|
+
when "aarch64-linux-gnu"
|
65
|
+
"aarch64-linux-gnu"
|
66
66
|
when /\Ax86_64-darwin/
|
67
67
|
"x86_64-darwin"
|
68
68
|
when /\Aarm64-darwin/
|
@@ -72,12 +72,24 @@ CrossRuby = Struct.new(:version, :host) do
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
def tag
|
76
|
+
@tag ||=
|
77
|
+
case platform
|
78
|
+
when "x86_64-linux-gnu"
|
79
|
+
"x86_64-linux"
|
80
|
+
when "aarch64-linux-gnu"
|
81
|
+
"aarch64-linux"
|
82
|
+
else
|
83
|
+
platform
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
75
87
|
def tool(name)
|
76
88
|
(@binutils_prefix ||=
|
77
89
|
case platform
|
78
90
|
when /x64-mingw(32|-ucrt)/
|
79
91
|
"x86_64-w64-mingw32-"
|
80
|
-
when /(x86_64|aarch64)-linux/
|
92
|
+
when /(x86_64|aarch64)-linux-gnu/
|
81
93
|
# We do believe that we are on Linux and can use native tools
|
82
94
|
""
|
83
95
|
when /x86_64.*darwin/
|
@@ -93,9 +105,9 @@ CrossRuby = Struct.new(:version, :host) do
|
|
93
105
|
case platform
|
94
106
|
when /64-mingw(32|-ucrt)/
|
95
107
|
"pei-x86-64"
|
96
|
-
when "x86_64-linux"
|
108
|
+
when "x86_64-linux-gnu"
|
97
109
|
"elf64-x86-64"
|
98
|
-
when "aarch64-linux"
|
110
|
+
when "aarch64-linux-gnu"
|
99
111
|
"elf64-little"
|
100
112
|
when "x86_64-darwin"
|
101
113
|
"Mach-O 64-bit x86-64"
|
@@ -142,7 +154,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
142
154
|
case platform
|
143
155
|
when WINDOWS_PLATFORM_REGEX
|
144
156
|
verify_entry_windows(dump, dll)
|
145
|
-
when
|
157
|
+
when LINUX_GNU_PLATFORM_REGEX
|
146
158
|
verify_entry_linux(dll)
|
147
159
|
when DARWIN_PLATFORM_REGEX
|
148
160
|
verify_entry_darwin(dll)
|
@@ -188,7 +200,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
188
200
|
end
|
189
201
|
|
190
202
|
def allowed_dlls_linux
|
191
|
-
suffix = (platform == "x86_64-linux" ? "x86-64" : "aarch64")
|
203
|
+
suffix = (platform == "x86_64-linux-gnu" ? "x86-64" : "aarch64")
|
192
204
|
[
|
193
205
|
"ld-linux-#{suffix}.so",
|
194
206
|
"libc.so",
|
@@ -210,7 +222,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
210
222
|
case platform
|
211
223
|
when WINDOWS_PLATFORM_REGEX
|
212
224
|
allowed_dlls_windows
|
213
|
-
when
|
225
|
+
when LINUX_GNU_PLATFORM_REGEX
|
214
226
|
allowed_dlls_linux
|
215
227
|
when DARWIN_PLATFORM_REGEX
|
216
228
|
allowed_dlls_darwin
|
@@ -236,7 +248,7 @@ CrossRuby = Struct.new(:version, :host) do
|
|
236
248
|
case platform
|
237
249
|
when DARWIN_PLATFORM_REGEX
|
238
250
|
actual_dlls_darwin(dll)
|
239
|
-
when
|
251
|
+
when LINUX_GNU_PLATFORM_REGEX
|
240
252
|
actual_dlls_linux(dump)
|
241
253
|
when WINDOWS_PLATFORM_REGEX
|
242
254
|
actual_dlls_windows(dump)
|
@@ -291,7 +303,7 @@ def verify_dll(dll, cross_ruby)
|
|
291
303
|
cross_ruby.verify_imports(dump, dll)
|
292
304
|
# Not sure if it is required, probably not
|
293
305
|
# I am keeping related code as a reference for future advances
|
294
|
-
# cross_ruby.verify_glibc_version(dump, dll) if cross_ruby.
|
306
|
+
# cross_ruby.verify_glibc_version(dump, dll) if cross_ruby.linux_gnu?
|
295
307
|
|
296
308
|
puts "#{dll}: passed shared library sanity checks"
|
297
309
|
end
|
@@ -315,7 +327,7 @@ UBUNTU_PREREQ = "sudo apt-get update -y && sudo apt-get install -y automake auto
|
|
315
327
|
|
316
328
|
def pre_req(plat)
|
317
329
|
case plat
|
318
|
-
when
|
330
|
+
when /linux/
|
319
331
|
"if [[ $(awk -F= '/^NAME/{print $2}' /etc/os-release) == '\"Ubuntu\"' ]]; then #{UBUNTU_PREREQ}; else #{REDHAT_PREREQ}; fi"
|
320
332
|
else
|
321
333
|
UBUNTU_PREREQ.to_s
|
@@ -323,14 +335,16 @@ def pre_req(plat)
|
|
323
335
|
end
|
324
336
|
|
325
337
|
namespace "gem" do
|
326
|
-
CROSS_RUBIES.find_all { |cr| cr.windows? || cr.
|
338
|
+
CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux_gnu? || cr.darwin? }.map { |cr| { platform: cr.platform, tag: cr.tag } }
|
339
|
+
.uniq { |hash| hash[:platform] }.each do |hash|
|
340
|
+
plat = hash[:platform]
|
341
|
+
tag = hash[:tag]
|
327
342
|
desc "build native gem for #{plat} platform"
|
328
343
|
task plat do
|
329
|
-
RakeCompilerDock.sh <<~RCD, platform:
|
344
|
+
RakeCompilerDock.sh <<~RCD, platform: tag
|
330
345
|
#{pre_req(plat)} &&
|
331
346
|
gem install bundler --no-document &&
|
332
|
-
bundle &&
|
333
|
-
bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
|
347
|
+
bundle && bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
|
334
348
|
RCD
|
335
349
|
end
|
336
350
|
|
@@ -346,7 +360,7 @@ namespace "gem" do
|
|
346
360
|
multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq
|
347
361
|
|
348
362
|
desc "build native gems for linux"
|
349
|
-
multitask "linux" => CROSS_RUBIES.find_all(&:
|
363
|
+
multitask "linux-gnu" => CROSS_RUBIES.find_all(&:linux_gnu?).map(&:platform).uniq
|
350
364
|
|
351
365
|
desc "build native gems for darwin"
|
352
366
|
multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq
|
@@ -361,6 +375,7 @@ Rake::ExtensionTask.new("express_parser", GEMSPEC) do |ext|
|
|
361
375
|
ext.cross_compile = true
|
362
376
|
ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq
|
363
377
|
ext.cross_config_options << "--enable-cross-build"
|
378
|
+
|
364
379
|
ext.cross_compiling do |spec|
|
365
380
|
spec.files.reject! { |path| File.fnmatch?("ext/*", path) }
|
366
381
|
spec.dependencies.reject! { |dep| dep.name == "rice" }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expressir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0.pre.1
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -209,7 +209,7 @@ dependencies:
|
|
209
209
|
description: Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set
|
210
210
|
of Ruby tools for accessing ISO EXPRESS data models.
|
211
211
|
email:
|
212
|
-
- open.source@ribose.com
|
212
|
+
- open.source@ribose.com
|
213
213
|
executables:
|
214
214
|
- expressir
|
215
215
|
extensions: []
|
@@ -243,6 +243,7 @@ files:
|
|
243
243
|
- lib/expressir/express/3.1/express_parser.so
|
244
244
|
- lib/expressir/express/3.2/express_parser.so
|
245
245
|
- lib/expressir/express/cache.rb
|
246
|
+
- lib/expressir/express/extension.rb
|
246
247
|
- lib/expressir/express/formatter.rb
|
247
248
|
- lib/expressir/express/hyperlink_formatter.rb
|
248
249
|
- lib/expressir/express/model_visitor.rb
|
@@ -377,9 +378,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
377
378
|
version: 3.3.dev
|
378
379
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
379
380
|
requirements:
|
380
|
-
- - "
|
381
|
+
- - ">"
|
381
382
|
- !ruby/object:Gem::Version
|
382
|
-
version:
|
383
|
+
version: 1.3.1
|
383
384
|
requirements: []
|
384
385
|
rubygems_version: 3.3.26
|
385
386
|
signing_key:
|