From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D2BDF1F44D for ; Fri, 16 Feb 2024 21:45:40 +0000 (UTC) Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id CE3F782A5E; Fri, 16 Feb 2024 21:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1708119932; bh=ttu+3U7NJqfJFEKypm0mTpWR5HDq/fRjfhlJFJWN6Vo=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=p7z7xihh948q6MEtA4hycZpMRNaHlDCx1zHVUB7i7+FDa+xEdZS5EEhVv4+Xqmm+v naRLS7jTBntueNAmzB9F3G9g10dZwRUeGi9oYcVcgC4EPg3zSgIFjDfvkgkQVgper2 tsAv2KTmnMe0Mk5US3IBrE35p4eMEq6NTVhxzAJA= Received: from s.csnrwnwx.outbound-mail.sendgrid.net (s.csnrwnwx.outbound-mail.sendgrid.net [198.37.146.154]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 4CBED829DA for ; Fri, 16 Feb 2024 21:45:29 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=VCO+yFqh; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=rHfg2PKMmiXZHrcFwm8d61LoQU/sgAnX/vtwYSJYoDQ=; b=VCO+yFqhDnQ4cne/6BJ2JY1EwQk0OSJmB+x5sMf8hXGIS8sGnmMiKPzU69QCIc472qxN Vn7IEl+oQia/NZ9cbhB2clMFXIAJ3Eu66PJc/Yw8V6Vv7mBoWgrPLPf7T6VdnGe6yQigY7 asnaqygAXSKGaJolD1Xi3irxXhFpOPv2QrFVrz3v2h6NJYb1Q933FXPC6TnhxEgasLr339 dOTrCv7vAxqpNv2mOo8Ese1Zh+slvbfH62jGgC5J043DgjEJw31pFopv8qigNSYSOkpl8J aAg24oCkREdVkoAXZis88j1XjYv/C3PtDcB8wTPfSBQKSObd0LAynZMaYEaYPP8g== Received: by filterdrecv-58bfc74dd6-gsqtp with SMTP id filterdrecv-58bfc74dd6-gsqtp-1-65CFD777-3 2024-02-16 21:45:27.181853178 +0000 UTC m=+1927727.394662758 Received: from herokuapp.com (unknown) by geopod-ismtpd-5 (SG) with ESMTP id 9QMSXI4PQbSyxcFNRea8RA for ; Fri, 16 Feb 2024 21:45:27.124 +0000 (UTC) Date: Fri, 16 Feb 2024 21:45:27 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 19117 X-Redmine-Issue-Author: byroot X-Redmine-Sender: Dan0042 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 93365 X-SG-EID: =?us-ascii?Q?9vnO9kNFlf1pwhty1clU3mt9eNWYniufdXqocdsQQtaDTWZk4+b5g5js0Akvaj?= =?us-ascii?Q?32LW=2F+fGSAom3tt8Jo+=2FGW3uDD0ktbmu7qAbln0?= =?us-ascii?Q?uJrjIBsk6zuk=2FHCcX8BLsWi=2Fb6bJnh=2FK4nC6EnH?= =?us-ascii?Q?6qvZR2nVM=2F+TzmS5yMOdDD=2FA+tIl8pEMqxoRJSP?= =?us-ascii?Q?SmtdK6rWvTy=2FYytskYI5488U=2FSUW9OuFYIk4SYE?= =?us-ascii?Q?kr0YttH8GsOIE=2F7Nd3a2J1UIS4wnTgAzduTWNmS?= =?us-ascii?Q?r9KgVyRAB27HmayQfEAyw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: X3HFLPX44O3XX32GF5G67UNAE5BG3TXS X-Message-ID-Hash: X3HFLPX44O3XX32GF5G67UNAE5BG3TXS X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:116809] [Ruby master Feature#19117] Include the method owner in backtraces, not just the method name List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Dan0042 (Daniel DeLorme) via ruby-core" Cc: "Dan0042 (Daniel DeLorme)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19117 has been updated by Dan0042 (Daniel DeLorme). If "rescue in" is removed, then what happens to the similar "block in" ? Also in terms of quotes, what are your thoughts on `from ./test.rb:16:in 'block in Concrete#oops'` vs `from ./test.rb:16:in block in 'Concrete#oops'` ---------------------------------------- Feature #19117: Include the method owner in backtraces, not just the method name https://bugs.ruby-lang.org/issues/19117#change-106834 * Author: byroot (Jean Boussier) * Status: Closed * Priority: Normal * Target version: 3.4 ---------------------------------------- ``` module Foo class Bar def inspect 1 + '1' end end end p Foo::Bar.new ``` This code produce the following backtrace: ``` /tmp/foo.rb:4:in `+': String can't be coerced into Integer (TypeError) from /tmp/foo.rb:4:in `inspect' from /tmp/foo.rb:9:in `p' from /tmp/foo.rb:9:in `
' ``` This works, but on large codebases and large backtraces the method name isn't always all that revealing, most of the time you need to open many of the locations listed in the backtrace to really understand what is going on. I propose that we also include the owner name: ``` /tmp/foo.rb:4:in `Integer#+': String can't be coerced into Integer (TypeError) from /tmp/foo.rb:4:in `Foo::Bar#inspect' from /tmp/foo.rb:9:in `Kernel#p' from /tmp/foo.rb:9:in `
' ``` I believe that in many case it would allow to much better understand the backtrace without having to jump back and forth between it and the source code. This is inspired by @ivoanjo 's `backtracie` gem: https://github.com/ivoanjo/backtracie -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/