Undocumented changes: uuid_v4 alias
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 28/100
- Issue 類型
- 文件
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- ruby
研究方向
從 lib/random/formatter.rb 和相關的提交開始,然後將 securerandom v0.3.0 的發布頁面與相應的 stdlib 文件進行比較。該 issue 提議記錄 uuid_v4 別名,並更廣泛地記錄 Ruby 方法的引入時間,但沒有確定範圍或文件位置。Done 應包括一份關於別名變更、已達成共識並已發布的記錄。
由索引模型根據 Issue 內容生成。
描述
I was using Random.uuid_v4 in Ruby 3.3. Then executed the same code on Ruby 3.2 as my code is supposed to support 3.0-3.3 and got that error:
Quite obviously there was a change between 3.2 and 3.3 and uuid_v4 was not implemented.
I searched a lot about this change, I read Ruby official release notes, third party changelogs, github release notes, etc. … and nothing.
So I looked were uuid_v4 was in the code to discover it's an alias for uuid that was there long before.
uuid_v4 alias for uuid was introduced when uuid_v7 was introduced. It makes sense.
In securerandom: https://github.com/ruby/securerandom/commit/34ed1a2ec35dc8f00ff69665b373cef7484c937f
In stdlib: https://github.com/ruby/ruby/commit/dfb2b4cbc9aa5edc315e210bf6bfd92fcf6e45de
The introduction of uuidv7 in securerandom v0.3.0 is documented here: https://github.com/ruby/securerandom/releases/tag/v0.3.0.
The issue is uuid_v4 addition is not documented anywhere.
More generally, in Ruby, when you use a method, you have no clue when (in which version of ruby) this method was introduced. So it's quite inconvenient if you try to keep support for several versions of Ruby.
Unfortunately Ruby official documentation use plain old RDoc. While in Yard, there is a @since tag to document when a method or class was introduced. This helps a lot in that sens.
Also in the past, APIdock had a bar graph tracking Ruby changes so when browsing Ruby API via APIdock you knew in which version a change was introduced. Unfortunately, APIdock 1) is third party 2) is unmaintained since Ruby 2.6.3.
Has this topic already been discussed? Should I open an issue on Ruby issue tracker and ask the question on the mailing list?
In the meantime as far as securerandom is concerned:
- It seems there is no release note / change log tracked in git (the only release note is the one on github release: https://github.com/ruby/securerandom/releases)
- Could we edit v0.3.0 release (https://github.com/ruby/securerandom/releases/tag/v0.3.0) to document the fact that
uuid_v4alias was introduced? - I don't know how to document that change in Random::Formatter in stdlib
- 主要語言
- Ruby
- 星號
- 76
- 分支
- 17
- 平均合併
- 42 分鐘
- 30 天內合併 PR
- 5
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ruby/securerandom 的其他 Issue
-
SecureRandom.alphanumeric can silently return an empty or wrong-length secret instead of raising未關閉
難度 2/5 1-3 小時 新手友好度 67/100
ruby/securerandom#92 ·
-
難度 2/5 1-3 小時 新手友好度 76/100
ruby/securerandom#91 ·
-
難度 2/5 1-3 小時 新手友好度 35/100
ruby/securerandom#37 · 3 則留言 ·
-
Make ractor safe未關閉
難度 4/5 3-5 天 新手友好度 25/100
ruby/securerandom#16 ·
查看 ruby/securerandom 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
open-feature/ruby-sdk-contrib#340 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
zold-io/wts.zold.io#651 ·
維護者通常 1 天內回覆
-
good first issue help wanted
難度 2/5 1-3 小時 新手友好度 87/100
erkamyaman/rust-anything#788 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 74/100
TheOdinProject/curriculum#31579 ·
維護者通常 1 天內回覆