* [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle`
@ 2026-01-30 11:59 Earlopain (Earlopain _) via ruby-core
2026-02-02 10:39 ` [ruby-core:124658] " larskanis (Lars Kanis) via ruby-core
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Earlopain (Earlopain _) via ruby-core @ 2026-01-30 11:59 UTC (permalink / raw)
To: ruby-core; +Cc: Earlopain (Earlopain _)
Issue #21855 has been reported by Earlopain (Earlopain _).
----------------------------------------
Bug #21855: Bundle `win32-registry` or implement it without `fiddle`
https://bugs.ruby-lang.org/issues/21855
* Author: Earlopain (Earlopain _)
* Status: Open
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN
----------------------------------------
`win32-registry` (a default gem), is currently implemented via `fiddle` (a bundled gem). This makes it impossible to use under bundler without adding `fiddle` to the gemfile.
In the past it has lead to issues like https://bugs.ruby-lang.org/issues/21645. It was solved by simply not using `win32-registry` anymore in `resolv` and implementing it via C (https://github.com/ruby/resolv/pull/110), although the overarching issue is still present. There is also a report for this for rubygems https://github.com/ruby/rubygems/issues/9277. This should be solved by updating the vendored `resolv` version I think.
Still, the dependecy relation between `win32-registry` and `fiddle` is pretty incompatible. A default gem can't depend on a bundled gem without breaking dependency resolution.
To solve this it would have to be implemented without using `fiddle`, similar to how `resolv` did it. But now that `resolv` doesn't use `win32-registry`, I don't think anything in ruby uses it anymore. So moving it to a bundled gem could also be a solution without rewriting the whole thing.
Here is an issue about this in the `win32-registry` repo: https://github.com/ruby/win32-registry/issues/11
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:124658] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle`
2026-01-30 11:59 [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle` Earlopain (Earlopain _) via ruby-core
@ 2026-02-02 10:39 ` larskanis (Lars Kanis) via ruby-core
2026-02-13 7:07 ` [ruby-core:124810] " hsbt (Hiroshi SHIBATA) via ruby-core
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: larskanis (Lars Kanis) via ruby-core @ 2026-02-02 10:39 UTC (permalink / raw)
To: ruby-core; +Cc: larskanis (Lars Kanis)
Issue #21855 has been updated by larskanis (Lars Kanis).
I recommended to make `win32-registry` a bundled gem in #20775, but maybe it was forgotten to that time. I still think this would be the best solution.
----------------------------------------
Bug #21855: Bundle `win32-registry` or implement it without `fiddle`
https://bugs.ruby-lang.org/issues/21855#change-116253
* Author: Earlopain (Earlopain _)
* Status: Open
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN
----------------------------------------
`win32-registry` (a default gem), is currently implemented via `fiddle` (a bundled gem). This makes it impossible to use under bundler without adding `fiddle` to the gemfile.
In the past it has lead to issues like https://bugs.ruby-lang.org/issues/21645. It was solved by simply not using `win32-registry` anymore in `resolv` and implementing it via C (https://github.com/ruby/resolv/pull/110), although the overarching issue is still present. There is also a report for this for rubygems https://github.com/ruby/rubygems/issues/9277. This should be solved by updating the vendored `resolv` version I think.
Still, the dependecy relation between `win32-registry` and `fiddle` is pretty incompatible. A default gem can't depend on a bundled gem without breaking dependency resolution.
To solve this it would have to be implemented without using `fiddle`, similar to how `resolv` did it. But now that `resolv` doesn't use `win32-registry`, I don't think anything in ruby uses it anymore. So moving it to a bundled gem could also be a solution without rewriting the whole thing.
Here is an issue about this in the `win32-registry` repo: https://github.com/ruby/win32-registry/issues/11
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:124810] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle`
2026-01-30 11:59 [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle` Earlopain (Earlopain _) via ruby-core
2026-02-02 10:39 ` [ruby-core:124658] " larskanis (Lars Kanis) via ruby-core
@ 2026-02-13 7:07 ` hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-17 20:40 ` [ruby-core:124847] " larskanis (Lars Kanis) via ruby-core
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2026-02-13 7:07 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21855 has been updated by hsbt (Hiroshi SHIBATA).
Status changed from Open to Assigned
No one opposed it at devmeeting. I will ask usa and handle to extract that as bundled gems at Ruby 4.1.
----------------------------------------
Bug #21855: Bundle `win32-registry` or implement it without `fiddle`
https://bugs.ruby-lang.org/issues/21855#change-116430
* Author: Earlopain (Earlopain _)
* Status: Assigned
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN
----------------------------------------
`win32-registry` (a default gem), is currently implemented via `fiddle` (a bundled gem). This makes it impossible to use under bundler without adding `fiddle` to the gemfile.
In the past it has lead to issues like https://bugs.ruby-lang.org/issues/21645. It was solved by simply not using `win32-registry` anymore in `resolv` and implementing it via C (https://github.com/ruby/resolv/pull/110), although the overarching issue is still present. There is also a report for this for rubygems https://github.com/ruby/rubygems/issues/9277. This should be solved by updating the vendored `resolv` version I think.
Still, the dependecy relation between `win32-registry` and `fiddle` is pretty incompatible. A default gem can't depend on a bundled gem without breaking dependency resolution.
To solve this it would have to be implemented without using `fiddle`, similar to how `resolv` did it. But now that `resolv` doesn't use `win32-registry`, I don't think anything in ruby uses it anymore. So moving it to a bundled gem could also be a solution without rewriting the whole thing.
Here is an issue about this in the `win32-registry` repo: https://github.com/ruby/win32-registry/issues/11
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:124847] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle`
2026-01-30 11:59 [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle` Earlopain (Earlopain _) via ruby-core
2026-02-02 10:39 ` [ruby-core:124658] " larskanis (Lars Kanis) via ruby-core
2026-02-13 7:07 ` [ruby-core:124810] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2026-02-17 20:40 ` larskanis (Lars Kanis) via ruby-core
2026-02-20 4:22 ` [ruby-core:124853] " hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-20 22:33 ` [ruby-core:124856] " larskanis (Lars Kanis) via ruby-core
4 siblings, 0 replies; 6+ messages in thread
From: larskanis (Lars Kanis) via ruby-core @ 2026-02-17 20:40 UTC (permalink / raw)
To: ruby-core; +Cc: larskanis (Lars Kanis)
Issue #21855 has been updated by larskanis (Lars Kanis).
https://github.com/ruby/ruby/pull/16189
----------------------------------------
Bug #21855: Bundle `win32-registry` or implement it without `fiddle`
https://bugs.ruby-lang.org/issues/21855#change-116500
* Author: Earlopain (Earlopain _)
* Status: Assigned
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN
----------------------------------------
`win32-registry` (a default gem), is currently implemented via `fiddle` (a bundled gem). This makes it impossible to use under bundler without adding `fiddle` to the gemfile.
In the past it has lead to issues like https://bugs.ruby-lang.org/issues/21645. It was solved by simply not using `win32-registry` anymore in `resolv` and implementing it via C (https://github.com/ruby/resolv/pull/110), although the overarching issue is still present. There is also a report for this for rubygems https://github.com/ruby/rubygems/issues/9277. This should be solved by updating the vendored `resolv` version I think.
Still, the dependecy relation between `win32-registry` and `fiddle` is pretty incompatible. A default gem can't depend on a bundled gem without breaking dependency resolution.
To solve this it would have to be implemented without using `fiddle`, similar to how `resolv` did it. But now that `resolv` doesn't use `win32-registry`, I don't think anything in ruby uses it anymore. So moving it to a bundled gem could also be a solution without rewriting the whole thing.
Here is an issue about this in the `win32-registry` repo: https://github.com/ruby/win32-registry/issues/11
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:124853] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle`
2026-01-30 11:59 [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle` Earlopain (Earlopain _) via ruby-core
` (2 preceding siblings ...)
2026-02-17 20:40 ` [ruby-core:124847] " larskanis (Lars Kanis) via ruby-core
@ 2026-02-20 4:22 ` hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-20 22:33 ` [ruby-core:124856] " larskanis (Lars Kanis) via ruby-core
4 siblings, 0 replies; 6+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2026-02-20 4:22 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21855 has been updated by hsbt (Hiroshi SHIBATA).
@usa has no objection for that. I will merge https://bugs.ruby-lang.org/issues/21855#note-6 and handle related works.
----------------------------------------
Bug #21855: Bundle `win32-registry` or implement it without `fiddle`
https://bugs.ruby-lang.org/issues/21855#change-116508
* Author: Earlopain (Earlopain _)
* Status: Assigned
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN
----------------------------------------
`win32-registry` (a default gem), is currently implemented via `fiddle` (a bundled gem). This makes it impossible to use under bundler without adding `fiddle` to the gemfile.
In the past it has lead to issues like https://bugs.ruby-lang.org/issues/21645. It was solved by simply not using `win32-registry` anymore in `resolv` and implementing it via C (https://github.com/ruby/resolv/pull/110), although the overarching issue is still present. There is also a report for this for rubygems https://github.com/ruby/rubygems/issues/9277. This should be solved by updating the vendored `resolv` version I think.
Still, the dependecy relation between `win32-registry` and `fiddle` is pretty incompatible. A default gem can't depend on a bundled gem without breaking dependency resolution.
To solve this it would have to be implemented without using `fiddle`, similar to how `resolv` did it. But now that `resolv` doesn't use `win32-registry`, I don't think anything in ruby uses it anymore. So moving it to a bundled gem could also be a solution without rewriting the whole thing.
Here is an issue about this in the `win32-registry` repo: https://github.com/ruby/win32-registry/issues/11
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:124856] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle`
2026-01-30 11:59 [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle` Earlopain (Earlopain _) via ruby-core
` (3 preceding siblings ...)
2026-02-20 4:22 ` [ruby-core:124853] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2026-02-20 22:33 ` larskanis (Lars Kanis) via ruby-core
4 siblings, 0 replies; 6+ messages in thread
From: larskanis (Lars Kanis) via ruby-core @ 2026-02-20 22:33 UTC (permalink / raw)
To: ruby-core; +Cc: larskanis (Lars Kanis)
Issue #21855 has been updated by larskanis (Lars Kanis).
Thanks for merging!
There is a second bug, that is fixed by making win32-registry a bundled gem: The gemspec of the default gem looks like so:
```ruby
$ cat c:\Ruby40-arm\lib\ruby\gems\4.0.0\specifications\default\win32-registry-0.1.2.gemspec
# -*- encoding: utf-8 -*-
# stub: win32-registry 0.1.2 ruby lib
Gem::Specification.new do |s|
s.name = "win32-registry".freeze
s.version = "0.1.2".freeze
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "homepage_uri" => "https://github.com/ruby/win32-registry", "source_code_uri" => "https://github.com/ruby/win32-registry" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["U.Nakamura".freeze]
s.bindir = "exe".freeze
s.date = "2026-01-13"
s.description = "Provides an interface to the Windows Registry in Ruby".freeze
s.email = ["usa@garbagecollect.jp".freeze]
s.files = ["lib/win32/registry.rb".freeze, "lib/win32/resolv.rb".freeze]
s.homepage = "https://github.com/ruby/win32-registry".freeze
s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
s.rubygems_version = "4.0.3".freeze
s.summary = "Provides an interface to the Windows Registry in Ruby".freeze
s.specification_version = 4
s.add_runtime_dependency(%q<fiddle>.freeze, ["~> 1.0".freeze])
end
```
The problem is, it contains a foreign file `win32/revolv.rb`:
```
s.files = ["lib/win32/registry.rb".freeze, "lib/win32/resolv.rb".freeze]
```
That leads to fetching the gemspec of win32-registry, although win32/resolv is required and although win32/resolv is independent from win32-registry since ruby-4.0. That leads to failures like here:
* https://github.com/ruby/rubygems/issues/9277#issue-3869290287 and
* https://github.com/ruby/rubygems/pull/9235/changes/e85c31f02a75ffeac73b4d491b8f989ff31c029e
So is could this commit be backported to ruby-4.0.x? If no: Do you think there are issues if I backport it specifically for RubyInstaller-4.0.2+?
----------------------------------------
Bug #21855: Bundle `win32-registry` or implement it without `fiddle`
https://bugs.ruby-lang.org/issues/21855#change-116511
* Author: Earlopain (Earlopain _)
* Status: Closed
* Assignee: hsbt (Hiroshi SHIBATA)
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN
----------------------------------------
`win32-registry` (a default gem), is currently implemented via `fiddle` (a bundled gem). This makes it impossible to use under bundler without adding `fiddle` to the gemfile.
In the past it has lead to issues like https://bugs.ruby-lang.org/issues/21645. It was solved by simply not using `win32-registry` anymore in `resolv` and implementing it via C (https://github.com/ruby/resolv/pull/110), although the overarching issue is still present. There is also a report for this for rubygems https://github.com/ruby/rubygems/issues/9277. This should be solved by updating the vendored `resolv` version I think.
Still, the dependecy relation between `win32-registry` and `fiddle` is pretty incompatible. A default gem can't depend on a bundled gem without breaking dependency resolution.
To solve this it would have to be implemented without using `fiddle`, similar to how `resolv` did it. But now that `resolv` doesn't use `win32-registry`, I don't think anything in ruby uses it anymore. So moving it to a bundled gem could also be a solution without rewriting the whole thing.
Here is an issue about this in the `win32-registry` repo: https://github.com/ruby/win32-registry/issues/11
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-20 22:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30 11:59 [ruby-core:124646] [Ruby Bug#21855] Bundle `win32-registry` or implement it without `fiddle` Earlopain (Earlopain _) via ruby-core
2026-02-02 10:39 ` [ruby-core:124658] " larskanis (Lars Kanis) via ruby-core
2026-02-13 7:07 ` [ruby-core:124810] " hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-17 20:40 ` [ruby-core:124847] " larskanis (Lars Kanis) via ruby-core
2026-02-20 4:22 ` [ruby-core:124853] " hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-20 22:33 ` [ruby-core:124856] " larskanis (Lars Kanis) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).