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 [IPv6:2a01:4f8:1c0c:6b10::1]) (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 077851F405 for ; Sat, 20 Jan 2024 16:50:56 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=Tb7DzbhG; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=oOJ5LoUV; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 1D4C881DF0; Sat, 20 Jan 2024 16:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1705769448; bh=RpXr1gPLGIvUCr6AlAx8nBTVwv4wd3L4ahL7Ne27kp0=; 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=Tb7DzbhGN5TG4hHmbzVM/Z8RLbolcxIRvQfGqADzx+ojn3WYX+3qQhIQ8+ooUeTnS Rqm4NkyOGmTAzvnQvSJr1aneEhzl86r5wKz9y+cB/btn5zrvLwTw+SyDLtQQwXMrBx eFhxtj96dHEV8rrrolpKFV3lYb44NTk02xLhlaU0= Received: from wrqvtvvn.outbound-mail.sendgrid.net (wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 0620981DC4 for ; Sat, 20 Jan 2024 16:50:44 +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=oOJ5LoUV; 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=GSMqiqH3OtgCzII11vqEqZTVFosRQtE/GTa6Z6NNGic=; b=oOJ5LoUVt44WkbjRuk0ggaqa9f7JDIN5KrBENCUg5CBB3C22a/N1e6F931dt3YNCab5b XPvzV27uq6mRiZ8NiyI7m4MAG+e4bVK2DOnCGW7AU6oBjF3xBDYAcZjRzn+9Hwv3zvbZYO 5uc/mNJCv+ZYxeyPDBOsAQ5AftvJwRjp9lNf2zjjQ2yB04N7hy7k0e+XbLzEKbTAv+MwE6 HwiqV3RTQQH4IO+h58yzsqXAe+ITDDfdasYc0RNxl/uLIeSg7ETOtlkQxXY9+oPCSfQnO6 uq1OBtPZkxgVksXbWLyNxZh6FVzwdTIvqiwuDK2XjfVtSXT/UwT2ODHmJsul2oSA== Received: by filterdrecv-6b68c9f446-8bxlf with SMTP id filterdrecv-6b68c9f446-8bxlf-1-65ABF9E3-17 2024-01-20 16:50:43.861151728 +0000 UTC m=+8201392.698120821 Received: from herokuapp.com (unknown) by geopod-ismtpd-24 (SG) with ESMTP id 08qd8JnmQ-CisTak5-K1nQ for ; Sat, 20 Jan 2024 16:50:43.817 +0000 (UTC) Date: Sat, 20 Jan 2024 16:50:43 +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: 92909 X-SG-EID: =?us-ascii?Q?9vnO9kNFlf1pwhty1clU3mt9eNWYniufdXqocdsQQtaDTWZk4+b5g5js0Akvaj?= =?us-ascii?Q?32LW=2F+fGSAom3tt8Jo+=2FGW3uDD0ktbmu7qAbln0?= =?us-ascii?Q?uJrjICn5n2slLj58P3jdOqJszIhJCaRCAHGPnVs?= =?us-ascii?Q?krBtbGOrJ2IZt1nu4Mh3ZFUbsZnBwIOdybRdP7V?= =?us-ascii?Q?xC3fVqjzFyCKffLbB3VuQwpo9X4bNvDUFU6YvFz?= =?us-ascii?Q?vy0NJS8=2FKJbaIsHQTcIi+vHsxlPh67+demOY=2FG+?= =?us-ascii?Q?ft=2FXJG=2FAtX9nfwLRnT0sg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: Y5IVDTR4VSPBHE64EGCQJN4NQFPGCGFI X-Message-ID-Hash: Y5IVDTR4VSPBHE64EGCQJN4NQFPGCGFI 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:116348] [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). byroot (Jean Boussier) wrote in #note-36: > Also it's likely (still not 100% decided) we'll be running a 3.4 prerelease sometime around March or April on our monolith, so we can get feedback from hundreds of developers long before the final release. Oh, that's very nice. I'm looking forward to hear the feedback from actual usage. ---------------------------------------- Feature #19117: Include the method owner in backtraces, not just the method name https://bugs.ruby-lang.org/issues/19117#change-106370 * Author: byroot (Jean Boussier) * Status: Open * 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/