token_stream and skip_document inconsistency
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- documentation, tooling
调研方向
从提供的 C 复现开始,检查 RDoc 如何将 token_stream 关联到共享同一源的各个方法,尤其是对 skip_description 和 call-seq 的处理。比较列出的受影响方法,并确认从 call-seq 中省略的方法不会成为主定义;当别名都能一致地提供描述和 Source 切换时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Complex#conjugate have token_stream but marked as skip_document
Complex#conjugate has ▶︎Source toggle but description is skipped.
Complex#conj has document but ▶︎Source is not available.
The behavior of this bug looks similar to #1335 but the cause is different.
skip_description
# Whether to skip the method description, true for methods that have
# aliases with a call-seq that doesn't include the method name.
I think this design decision makes sense. There is a room for discussion whether we really need to generate duplicated document for the same method.
token_stream
Among method/aliases with the same source, RDoc seems to select one main method. token_stream is associated to that method object.
RDoc shouldn't select description-skipped method object as main method.
Reproduction code
/*
* call-seq:
* conj -> complex
* Description
*/
VALUE rb_complex_conjugate(VALUE self){return Qnil;}
void Init_Foo(){
rb_cComplex = rb_define_class("Complex", rb_cObject);
rb_define_method(rb_cComplex, "conjugate", rb_complex_conjugate, 0);
rb_define_method(rb_cComplex, "conj", rb_complex_conjugate, 0);
}
RDoc thinks the first define_method (conjugate) is the main definition. token_stream is associated to it. But conjugate is not in call-seq.
Methods that have this problem
Complex#conjugate
Complex#imaginary
Complex#rectangular
Enumerable#collect
Enumerable#find_all
Enumerable#member?
Forwardable#instance_delegate
Hash#initialize_copy
IO#each
Integer#===
MatchData#eql?
Numeric#conjugate
Numeric#imaginary
Numeric#rectangular
ObjectSpace::WeakMap#include?
Range#member?
Regexp#eql?
SingleForwardable#single_delegate
StringIO#each
StringIO#eof
Time#getgm
Time#gmtime
Time#gmtoff
Time#isdst
Time#tv_nsec
Time#tv_usec
- 主要语言
- Ruby
- 星标
- 927
- 派生
- 467
- 平均合并
- 23 小时 47 分钟
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/rdoc 的其他 Issue
-
RDoc 8.0.0 gem omits `doc/rdoc/example.rb`, which is referenced by the packaged markup documentation可能已有人在做 @OskarEichler 于 44 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Regexp generated from unescaped input in #expand_class可能已有人在做 @jaynetics 于 2 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 25/100
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 68/100
维护者通常 1 天内回复
-
Wrong heading levels in generated HTML?可能已有人在做 @st0012 于 9 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 68/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 8 天内回复
-
bug: "Conversation information" accordion renders blank with 0px height when conversation has no attributes可能已有人在做 @gihovani 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 2 天内回复
-
`hanami generate repository` would be a nice alias for `hanami generate repo`可能已有人在做 @sandbergja 今天认领。 未关闭bug help wanted
难度 2/5 1-3 小时 新手友好度 74/100
hanami/hanami-cli#455 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 69/100
asciidoctor/asciidoctor#4882 · 4 条评论 ·