homura-runtime 0.3.16 → 0.3.18
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/CHANGELOG.md +12 -0
- data/lib/homura/runtime/version.rb +1 -1
- data/lib/ruby_lsp/addon.rb +6 -0
- data/lib/ruby_lsp/phlex/addon.rb +23 -0
- data/lib/zeitwerk/opal_compat.rb +26 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 759c2bd72883b30ec71409f28b5758557700c8e82c85b4eac9f22ca8c8b50322
|
|
4
|
+
data.tar.gz: adcf716353d3da4c2f2a491a70c70a41a36f6899c3a8352f717c210a74ece8bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 811e444d1f269aeff5ad9d18997f16271c58123ac4021653e8a01535be59459b3f5d5af086c988e9396286066827949c03cdff7bc1399834f9c824faa073b814
|
|
7
|
+
data.tar.gz: f328f43a8df03c8d3b82c76bf9603631a0fe4a0481e658edd957ca12a7b9077fe7da8addf356a0e057ecd220e6562a7398a326f100199722f1bbd98e0c0ca010
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.18 (2026-06-25)
|
|
4
|
+
|
|
5
|
+
- Return a no-op Zeitwerk loader for Phlex/Literal when the generated bundle
|
|
6
|
+
runs on Opal. The gem tree is already compiled into the Worker, so runtime
|
|
7
|
+
loader setup must not inspect the original RubyGems filesystem path.
|
|
8
|
+
|
|
9
|
+
## 0.3.17 (2026-06-25)
|
|
10
|
+
|
|
11
|
+
- Add Ruby LSP addon no-op stubs for published Phlex builds. The Workers
|
|
12
|
+
runtime does not use Ruby LSP, but Phlex's library tree can reference those
|
|
13
|
+
files during standalone Opal builds from Rubygems.
|
|
14
|
+
|
|
3
15
|
## 0.3.16 (2026-06-25)
|
|
4
16
|
|
|
5
17
|
- Shadow Phlex compiler files with runtime no-op stubs for Opal builds. Workers
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ruby_lsp/addon"
|
|
4
|
+
|
|
5
|
+
module RubyLsp
|
|
6
|
+
module Phlex
|
|
7
|
+
class Addon < ::RubyLsp::Addon
|
|
8
|
+
def activate(_global_state, _message_queue)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def deactivate
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def name
|
|
15
|
+
"Phlex"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def version
|
|
19
|
+
"0.1.0"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/zeitwerk/opal_compat.rb
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
require "zeitwerk"
|
|
4
4
|
|
|
5
5
|
module Zeitwerk
|
|
6
|
+
class HomuraOpalLoader
|
|
7
|
+
Inflector = Struct.new(:rules) do
|
|
8
|
+
def inflect(overrides)
|
|
9
|
+
rules.merge!(overrides)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
attr_reader :inflector
|
|
14
|
+
|
|
15
|
+
def initialize
|
|
16
|
+
@inflector = Inflector.new({})
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def ignore(*)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def collapse(*)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def setup
|
|
26
|
+
self
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
6
30
|
class << self
|
|
7
31
|
attr_accessor :__homura_next_gem_root
|
|
8
32
|
|
|
@@ -26,6 +50,8 @@ module Zeitwerk
|
|
|
26
50
|
def for_gem(warn_on_extra_files: true)
|
|
27
51
|
if (root_file = Zeitwerk.__homura_next_gem_root)
|
|
28
52
|
Zeitwerk.__homura_next_gem_root = nil
|
|
53
|
+
return Zeitwerk::HomuraOpalLoader.new if RUBY_ENGINE == "opal"
|
|
54
|
+
|
|
29
55
|
Registry.loader_for_gem(
|
|
30
56
|
root_file,
|
|
31
57
|
namespace: Object,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: homura-runtime
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kazuhiro Homma
|
|
@@ -77,6 +77,8 @@ files:
|
|
|
77
77
|
- lib/phlex/compiler.rb
|
|
78
78
|
- lib/phlex/compiler/method_compiler.rb
|
|
79
79
|
- lib/phlex/opal_compat.rb
|
|
80
|
+
- lib/ruby_lsp/addon.rb
|
|
81
|
+
- lib/ruby_lsp/phlex/addon.rb
|
|
80
82
|
- lib/zeitwerk/opal_compat.rb
|
|
81
83
|
- runtime/patch-opal-evals.mjs
|
|
82
84
|
- runtime/setup-node-crypto.mjs
|