New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] Improve NEWS.md rendering and add missing features #9308
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. Only a couple changes requested.
NEWS.md
Outdated
@@ -67,6 +68,16 @@ Note: We're only listing outstanding class updates. | |||
* Module#set_temporary_name added for setting a temporary name for a | |||
module. [[Feature #19521]] | |||
|
|||
* NoMethodError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this change is worth mentioning in NEWS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to explain this in "Compatibility issues" section than in "Core classes updates".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremyevans My thinking here is this:
- It is a part of public behavior
- It is a behavior that is frequently encountered (i.e., almost every Rubyist sees this error almost every day, while some other notable changes like
WeakKeyMap
orFiber#kill
are something that wouldn't be used by as many people) - The change affects the quality of life. I understand the justification, yet the change might make somebody's debugging harder (by not seeing the real problematic object) and somebody's easier (by removing 20-lines
#inspect
s of complicated objects) - The change also might affect application/library code (this is purely theoretical, but not unimaginable that some code caught the error and extracted the
#inspect
of the affected object; or that somebody's#inspect
was defined in the way that considered frequent rendering in this message) - The entry in
NEWS
not only explains the change but links to the corresponding discussion, so when one sees in the new version, "wait, is this changed?" they can a) find the entry in NEWS (and make sure the change was conscious, not some side-effect or bug) and b) find the justification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zverok I read what you wrote and still do not think this is worth mentioning. There is a tradeoff in mentioning anything in NEWS. We want NEWS to be short enough that people will read it, hitting the important parts of the release. NEWS is not designed to be comprehensive and discuss every single change since the last release. If you think this is a compatibility issue (I do not), take @mame's advice and put it in the compatibility issues section. Otherwise, I think it should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm for because it is a part of public behavior.
Generally speaking NEWS.md is allowed to write about something if a committer thinks it should be.
I think what jeremy says is rather a release note.
NEWS.md
Outdated
@@ -488,3 +510,5 @@ changelog for details of the default gems or bundled gems. | |||
[Feature #19965]: https://bugs.ruby-lang.org/issues/19965 | |||
[Feature #20005]: https://bugs.ruby-lang.org/issues/20005 | |||
[Feature #20057]: https://bugs.ruby-lang.org/issues/20057 | |||
[Bug #19293]: https://bugs.ruby-lang.org/issues/19293 | |||
[Feature #18285]: https://bugs.ruby-lang.org/issues/18285 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When removing the NoMethodError change, we would want to remove this line as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to sort by URLs.
@@ -75,7 +86,7 @@ Note: We're only listing outstanding class updates. | |||
|
|||
* ObjectSpace::WeakMap | |||
|
|||
* `ObjectSpace::WeakMap#delete` was added to eagerly clear weak map |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you remove backquote even though it is .md
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be marked up as <code>
without backquotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ko1 Without backticks RDoc is able to linkify the method name.
The current version:
After the fix:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
For me, it is better to allow backquotes and rdoc also accepts backquoted method names in future, because it is easy to copy & paste to other articles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the case of "only method name enclosed in backquotes", right?
E.g., `ObjectSpace::WeakMap#delete`
, but not `(ObjectSpace::WeakMap#delete)`
.
It would be better but should be requested to ruby/rdoc, not here.
* Fix rendering of Ruby examples by RDoc; * Fix links to methods references; * Add missing minor changes.
11427c9
to
39539cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One additional change requested. After that, OK to merge without further review.
NEWS.md
Outdated
```ruby | ||
Time.new('2023-12-20') | ||
# no time information (ArgumentError) | ||
Time.new('2023-12-20') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses the same code twice, which doesn't appear intentional. I would remove the duplicate lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. Meant to show "year-month" and "year-month-day", it is a typo. But anyway, I think one example is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did mention in my previous review that this could be merged without further review after the change I requested was made.
Please squash when merging.
Queue#freeze
→Thread::Queue#freeze
, remove unnecessary backticks, etc.)Time.new
stricter parsing of strings;NoMethodError
rendering logic change.