From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81477 invoked by alias); 17 Sep 2019 18:24:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 81396 invoked by uid 89); 17 Sep 2019 18:24:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1240 X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Sep 2019 18:24:28 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway23.websitewelcome.com (Postfix) with ESMTP id C6B6E29D55 for ; Tue, 17 Sep 2019 13:23:17 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id AI8Dip4kM90onAI8DiX9gZ; Tue, 17 Sep 2019 13:23:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xhUhYOAjAvel9qZYxdFR6vsiQ+9yAN+wd6pXnq00lXM=; b=VAMU60r2xRe4KVsCE2PgdgAkJn HCaoUJIftnPMOVi2bf0IIMDRcci+WNzif8dqRHxNDrmkdBOrE30sJOrve9BkMMsYjoemSXD7+Zk+T yS4HALWFUrCeTdGsR8JLDDo/E; Received: from 71-218-73-27.hlrn.qwest.net ([71.218.73.27]:59778 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iAI8D-002wSx-G3; Tue, 17 Sep 2019 13:23:17 -0500 From: Tom Tromey To: Tom de Vries Cc: Tom Tromey , gdb-patches@sourceware.org, Pedro Alves Subject: Re: [PATCH v2 2/2] Add Rust support to source highlighting References: <20190727155155.32417-1-tom@tromey.com> <20190727155155.32417-3-tom@tromey.com> <332da42c-ae75-a148-221f-4f7bb815f40f@suse.de> <87v9u05en8.fsf@tromey.com> Date: Tue, 17 Sep 2019 18:24:00 -0000 In-Reply-To: (Tom de Vries's message of "Thu, 12 Sep 2019 21:20:22 +0200") Message-ID: <87pnjywzmz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-09/txt/msg00323.txt.bz2 >>>>> "Tom" == Tom de Vries writes: Tom> Tested on openSUSE Leap 15.1, both with and without source-highlight Tom> package installed. Tom> OK for 8.3 branch? This looks fine to me, but I had two comments. First, Joel pointed out earlier that backports require a tracking PR, so be sure to file one and mention it in the commit. Second, up-thread you said: Tom> This expection happens when the library attempts to access Tom> /usr/share/source-highlight/esc.outlang, which is not there, because Tom> it's contained in another package (source-highlight). ... but the patch does: Tom> srchilite::SourceHighlight highlighter ("esc.outlang"); Tom> highlighter.setStyleFile("esc.style"); Tom> - std::ostringstream output; Tom> - highlighter.highlight (input, output, lang_name, fullname); Tom> + try Tom> + { Tom> + std::ostringstream output; Tom> + highlighter.highlight (input, output, lang_name, fullname); I am wondering if the "try" should encompass the construction of "highlighter". It's possible that it works fine as-is, since maybe the argument isn't used until highlighting is attempted -- but I figured I would ask just to be sure. thanks, Tom