Pseudoclasses via ruby-fiddle?
还没有人认领这个 Issue。
评估
调研方向
首先检查 lib/libui/ffi.rb 中引用的 libui FFI 绑定和 ruby-libui 示例,然后调查 Fiddle 当前如何公开原生调用和失败。明确 pseudoclass 和调试支持的具体范围,包括用户如何识别出错的调用或与 GC 相关的崩溃;完成条件是形成一份已达成共识的设计,或一份可实现、可测试的提案。
由索引模型根据 Issue 内容生成。
描述
Hello fiddle-folks,
fiddle is quite epic. kojix2 wrote the bindings (if you can call them) for libui - see here for
most of the try_extern calls:
https://github.com/kojix2/LibUI/blob/main/lib/libui/ffi.rb
As a "downstream" user, though, fiddle is not easy to use. Often I just get segfaults and
then I end up not understanding why. I can figure out indirectly to some extent and with
helpful comments (e. g. GC kicking in), but by and large I'd love if ruby-fiddle would have
more debug-friendly support - similar to did-you-mean gem or the recent debug-related
changes by mame in MRI ruby.
Having worked with ruby-gtk a lot I am kind of used to modify core widgets such as
Gtk::Windows or Gtk::Box (horizontal and vertical). I like simple APIs such as .add()
or << just to add widgets together, a bit like LEGO building blocks.
With fiddle, though, this is a bit complicated. So the core question for this issue is
whether fiddle could allow for "designated" pseudoclasses? I'd love to build up
classes that can simulate the Gtk widgets to some extent (at the least what libui
allows for; see also libui-ng that has been recently started).
Something where I can build "pseudoclasses" and then at the least the error
messages can be more helpful. Rather than a segfault as such, something
that allows us to investigate which line is faulty or why it crashed (e. g. GC
kicking in). kojix2 showed various work arounds (see the examples he provides
for ruby-libui) but this requires some more expert knowledge than many ruby
developers have. For instance I do not really know C. And while I should really
have learned C properly, ruby is simply more fun to work with! :D
I do not know how easy it would be to have something like pseudoclasses
work, and better error/debug support for fiddle. It's ok if the downstream
dev has to write more code to enable this - I am not really suggesting an
"autofixer" that solves all problems as-is. But something with better debug-support
and to use fiddle in a more ruby-way, including a traditional OOP-like hierarchy.
Getting random SEGFAULTS and not really knowing why can be frustrating.
Other than that fiddle is pretty cool. (ruby-gtk via gobject-introspection also
has this problem partially by the way - the error messages I get are often
not super-useful.)
- 主要语言
- Ruby
- 星标
- 195
- 派生
- 53
- 平均合并
- 23 小时 57 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/fiddle 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 30/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 2/5 1-3 小时 新手友好度 52/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
バグ
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 75/100
voxpupuli/puppet-epel#186 · 1 条评论 ·