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=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no 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 BAD5E1F44D for ; Thu, 21 Mar 2024 20:08:27 +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=CjIWFSt9; 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=r+VVPb/v; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 2759983643; Thu, 21 Mar 2024 20:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1711051699; bh=yRoXOVpJy9hQ5jmavAwg3zjc9OIRKkO9Zd2QBnLZJwA=; 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=CjIWFSt9qNd0SmsZsgYLgyGAnpLy86JDd/g/yCzekLWWqRVJjjzBathPpOSJaPUKO kk+lQLjVr1Hpz9PZTHLgs9GhVGyqmx6bS8NX6Gr16ap010swFnzWHC3YzgOUuz7nBa /h3hVqjDrsB9YtODmEs38/1q8q/FHPBfAMLucAaY= Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by nue.mailmanlists.eu (Postfix) with ESMTPS id AA3A48358A for ; Thu, 21 Mar 2024 20:08:15 +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=r+VVPb/v; 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=I0hZZXeoyd+76dolxqIZDyj+310/nfTQBYDtgziDFUI=; b=r+VVPb/vx3+Z4L9gL93Ng57Cr+SeFQtKqV9wk0vRUVp2QjDG50qgpJfrsn8i75UvX/zV UDi4+fEd0rWsLUIyU5z4Px1Wx+/XfjR6tMKtz3v2uNtV+qo7S8ub466lIeBMxWh6EAcfwD s79pvXhgtznmUNV/sDVkywPXNnt90ttF8odqdaf1lPsJoS8HdlBBxvz3v9BvsC3d9jdtnf DmKpLyL+yZUmfFfSXu+fyXAV8V0fJzFxs0YRznrJMpBieexfO06dEqoDKSqNdayAy6yYsx Bb74fYYy1FvATyzdgaUDR+Bs8IAVPzayo+tAEaLMhE3VLrcI+xzPnbdifVjkNABw== Received: by recvd-57769bb547-j4zp5 with SMTP id recvd-57769bb547-j4zp5-1-65FC93AD-13 2024-03-21 20:08:13.639002259 +0000 UTC m=+256102.294920243 Received: from herokuapp.com (unknown) by geopod-ismtpd-11 (SG) with ESMTP id entmgkJrST-P74jnqIB3aw for ; Thu, 21 Mar 2024 20:08:13.538 +0000 (UTC) Date: Thu, 21 Mar 2024 20:08:13 +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-Issue-Assignee: Eregon X-Redmine-Issue-Priority: Normal X-Redmine-Sender: Eregon 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: 93884 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax25Z+WEoDXzgKko+aEVKHKImTbtlGo?= =?us-ascii?Q?U4F963jhCzkdMZTfFG30XbzLndRq=2F6+sKj8kfS2?= =?us-ascii?Q?LFbPnS5zd0wZJ1XcYnHsdY8wsFIrSfigy2W7LSC?= =?us-ascii?Q?uhvUaq2LFlGoQN7wn3hDmatTpUplWVa2ZkAgGsm?= =?us-ascii?Q?qu+X10aKBQ1BInd9ce+PfpRTIg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 6PJHT5XOZ7AIKKJZYRUGXVTDYQ5AIBBU X-Message-ID-Hash: 6PJHT5XOZ7AIKKJZYRUGXVTDYQ5AIBBU 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:117285] [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: "Eregon (Benoit Daloze) via ruby-core" Cc: "Eregon (Benoit Daloze)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19117 has been updated by Eregon (Benoit Daloze). Assignee set to Eregon (Benoit Daloze) PR: https://github.com/ruby/ruby/pull/10325 ---------------------------------------- Feature #19117: Include the method owner in backtraces, not just the method name https://bugs.ruby-lang.org/issues/19117#change-107411 * Author: byroot (Jean Boussier) * Status: Closed * Assignee: Eregon (Benoit Daloze) * 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/