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 601F21F405 for ; Sat, 20 Jan 2024 11:04:22 +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=0SRBnUGd; 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=DGuHB5DU; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 88EC281E14; Sat, 20 Jan 2024 11:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1705748652; bh=CIqLZ+vOO4M0zu1dip7xhrrs3TeCYFtgZGgG2WM5oR4=; 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=0SRBnUGdV8+dFFbvdVK5sZKZ697aa3bm5YI904P1YYhRT7YNDaFufFAPdmFDItk61 jpXrCYNp3g9namUbgupMD3Q5LWABiAE3UK0YX+7x8Or2ty4LKPBzI1gkXX5MmdYHkF UYpegxhChioayj4/7k5hOsy46uRu7fjTWJks+j7M= Received: from wrqvtvtt.outbound-mail.sendgrid.net (wrqvtvtt.outbound-mail.sendgrid.net [149.72.120.119]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 6C6A781D36 for ; Sat, 20 Jan 2024 11:04:08 +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=DGuHB5DU; 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=4uP0zFVNosVCDUPxL0LxoUeq/Xb2ofNoJOgqeYTgY40=; b=DGuHB5DUtNkD94bjhzCleuIO5kLmOlryTawRSZPHUyplxgoMkC5UTq+mI2as0DWOlcHr mtTTdFNeYg3xOaGZyRUegvQka3ryJaylpb8hFSFo6lr31dpWK4HbWar3pRT2v1MdXGkOBk hcCJmft8PMFgEJPOp8AGSKPyMWDHs4mB7ypf2RL57BwCn6nn4mXW7+XX9HJEUq35yaCsgE FJFOjVTAQ7ISXtV5NJG2HvlLxUIzqGG7U95n4T8YHKF1U70lu4c3p5pLKhYyYAjsyLRZMh wyc4UBGT6OGzaTBgYWlphw4g0qwSZbie6rLDf3cMTaIiJBvOiXrFfXjiWqAWF9sA== Received: by filterdrecv-655bd866f5-cqqlx with SMTP id filterdrecv-655bd866f5-cqqlx-1-65ABA8A7-2 2024-01-20 11:04:07.105693584 +0000 UTC m=+769632.980096753 Received: from herokuapp.com (unknown) by geopod-ismtpd-20 (SG) with ESMTP id mlh_6DzcTnyX5WFuNi5K-g for ; Sat, 20 Jan 2024 11:04:07.052 +0000 (UTC) Date: Sat, 20 Jan 2024 11:04:07 +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: byroot 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: 92907 X-SG-EID: =?us-ascii?Q?Dq8GNIcVqP8cs5uR+EIAabfg3LE9XdC6dZ5KYNrMpf6VzBWG6HqArcu5raQjXL?= =?us-ascii?Q?IGTFdxKHUt7++67+KD54pNYXheirMcsUIf3sdgF?= =?us-ascii?Q?Riq06jCneZKYGjZHfGK98iAHmvbxcwfq=2FDMLyfv?= =?us-ascii?Q?Io0UgMv9pxJHBtQhBh=2FhS2ipOAhebya9q9PM2pV?= =?us-ascii?Q?P0Lrs9mPicAiDLFGgAGz9H6WkfmFq+=2F7Zf1upny?= =?us-ascii?Q?Q8OdbORQRjJksmhai7SudYm=2FI3Dh5T7WeJyKkAt?= =?us-ascii?Q?rYgPj=2Fr1geBoO4RgvMlAA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: 5MM74ZOSLLYYIHLGSMVLSV4ZXQNQE26U X-Message-ID-Hash: 5MM74ZOSLLYYIHLGSMVLSV4ZXQNQE26U 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:116346] [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: "byroot (Jean Boussier) via ruby-core" Cc: "byroot (Jean Boussier)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19117 has been updated by byroot (Jean Boussier). > large-scale app development Yes, the larger the app, the more likely you are to have many methods with the same name in different modules / classes, and the more gems with different file naming conventions. > It is hard to evaluate this kind of UI in the mind. We need to use it. Agreed. I'm for trying it early in the 3.4 cycle, if we get negative feedback from the community that tries the previews / rcs, we can always change it back before release. 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. ---------------------------------------- Feature #19117: Include the method owner in backtraces, not just the method name https://bugs.ruby-lang.org/issues/19117#change-106369 * 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/