ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:99856] [Ruby master Feature#17143] Improve support for warning categories
@ 2020-09-03  0:04 merch-redmine
  2020-09-23  4:57 ` [ruby-core:100080] " ko1
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: merch-redmine @ 2020-09-03  0:04 UTC (permalink / raw)
  To: ruby-core

Issue #17143 has been reported by jeremyevans0 (Jeremy Evans).

----------------------------------------
Feature #17143: Improve support for warning categories
https://bugs.ruby-lang.org/issues/17143

* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
----------------------------------------
Support was recently added for Warning.warn to accept a `category` keyword.  However, the initial implementation was limited to having `rb_warn_deprecated` and `rb_warn_deprecated_to_remove` use the `:deprecated` value for the `category` keyword.

It doesn't make sense to me to have a `category` keyword if it is only used for deprecation, so I propose we extend the support so that `Kernel#warn` accepts a category keyword (for Ruby-level warnings) and `rb_category_warn` and `rb_category_warning` functions be added to the C-API (for C-level warnings).  I also propose that we change existing `rb_warn` and `rb_warning` calls to `rb_category_warn` and `rb_category_warning`, so that all warnings issued by core Ruby are issued with an appropriate category.

I have implemented support for this in a pull request: https://github.com/ruby/ruby/pull/3508



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-11-20 13:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03  0:04 [ruby-core:99856] [Ruby master Feature#17143] Improve support for warning categories merch-redmine
2020-09-23  4:57 ` [ruby-core:100080] " ko1
2020-09-23  5:35 ` [ruby-core:100082] " merch-redmine
2020-09-23 17:44 ` [ruby-core:100088] " ko1
2020-09-23 18:01 ` [ruby-core:100089] " merch-redmine
2020-09-25  4:58 ` [ruby-core:100119] " matz
2020-09-25  5:04 ` [ruby-core:100120] " shyouhei
2020-09-25 19:43 ` [ruby-core:100158] " merch-redmine
2020-09-25 22:06 ` [ruby-core:100162] " merch-redmine
2020-09-30 15:12 ` [ruby-core:100238] " merch-redmine
2020-10-26  7:50 ` [ruby-core:100560] " matz
2020-10-26 15:59 ` [ruby-core:100577] " merch-redmine
2020-11-20  5:07 ` [ruby-core:100955] " naruse
2020-11-20  5:28 ` [ruby-core:100956] " merch-redmine
2020-11-20  5:31 ` [ruby-core:100957] " shyouhei
2020-11-20 13:05 ` [ruby-core:100977] " nobu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).