Trying to run `rake rdoc` without pre-existing main file raises an error
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- ruby
- 領域
- documentation, tooling
調査の方向性
Rakefile の RDoc::Task.new ブロックと rake rdoc を使い、文書化されている RDoc::Task の例に従って失敗を再現します。rdoc.main と rdoc.rdoc_files.include が doc/README.rdoc の欠落をどのように処理するかを追跡します。完了の条件は、そのファイルがなくても rake rdoc が成功し、なおかつ lib/**/*.rb の処理が続行されることです。
索引モデルが issue の本文から書いたものです。
説明
I'm following this documentation on how to add a rake task for generating the documentation. After defining the rake task trying to run rake rdoc raises
rake aborted!
Don't know how to build task 'doc/README.rdoc' (See the list of available tasks with `rake --tasks`)
I figured out that pre-creating the doc/README.rdoc file fixes the error, but to be honest it's not very clear from the docs that this file needs to be manually created first and the error is not very clear.
Suggestion: Automatically create the main file if it doesn't exist yet
My Rakefile
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rubocop/rake_task"
require "rdoc/task"
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
RDoc::Task.new do |rdoc|
rdoc.main = "doc/README.rdoc"
rdoc.rdoc_files.include("doc/README.rdoc", "lib/**/*.rb")
end
task default: %i[spec rubocop rdoc]
My Gemfile.lock
PATH
remote: .
specs:
code_words (0.1.0)
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
coderay (1.1.3)
diff-lcs (1.5.1)
json (2.7.2)
language_server-protocol (3.17.0.3)
method_source (1.1.0)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.1.2)
stringio
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
stringio (3.1.1)
unicode-display_width (2.5.0)
PLATFORMS
arm64-darwin-23
ruby
DEPENDENCIES
code_words!
pry (~> 0.14)
rake (~> 13.2)
rdoc (~> 6.7)
rspec (~> 3.13)
rubocop (~> 1.66)
BUNDLED WITH
2.5.11
Running the rake task without an existing doc/README.rdoc file raises an error.
$ rake rdoc
rake aborted!
Don't know how to build task 'doc/README.rdoc' (See the list of available tasks with `rake --tasks`)
/Users/leokiiski/.rvm/gems/ruby-3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/Users/leokiiski/.rvm/gems/ruby-3.3.0/bin/ruby_executable_hooks:22:in `eval'
/Users/leokiiski/.rvm/gems/ruby-3.3.0/bin/ruby_executable_hooks:22:in `<main>'
Tasks: TOP => rdoc => html/created.rid
(See full trace by running task with --trace)
After creating the file first it works
$ touch doc/README.rdoc
$ rake rdoc
Parsing sources...
100% [ 4/ 4] lib/code_words/version.rb
Generating Darkfish format into /Users/leokiiski/personal/code_words/html...
Files: 4
Classes: 2 (2 undocumented)
Modules: 1 (1 undocumented)
Constants: 1 (1 undocumented)
Attributes: 0 (0 undocumented)
Methods: 2 (2 undocumented)
Total: 6 (6 undocumented)
0.00% documented
Elapsed: 0.0s
- 主要言語
- Ruby
- スター
- 928
- フォーク
- 471
- 平均マージ
- 2日 4分
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/rdoc のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
RDoc 8.0.0 gem omits `doc/rdoc/example.rb`, which is referenced by the packaged markup documentation対応中かも @OskarEichler が 66 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
markdown html excerpt includes link parts対応中かも @anyingiit が 12 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
Regexp generated from unescaped input in #expand_class対応中かも @jaynetics が 25 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
👩💻 équipe CE fonctionnalité
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
betagouv/conseillers-entreprises#4779 ·
メンテナーはふだん 1 日以内に返信
-
Poetry updater rejects OR (||) Python constraints in PyprojectPreparer#update_python_requirementオープンL: python L: ruby:bundler
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
dependabot/dependabot-core#16819 ·
メンテナーはふだん 1 日以内に返信
-
resource: surah-info
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
TarteelAI/quranic-universal-library#996 ·
メンテナーはふだん 1 日以内に返信
-
Missing ar translation: components/common/CommunitySolution.tsx:communitySolution.authorsSolutionオープン
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信