From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: [FEATURE REQUEST] Add a hook to print warning message prefix string Date: Fri, 18 Mar 2016 15:38:28 +0800 Organization: HFG Message-ID: <1458286708.3981.60.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1458286730 3665 80.91.229.3 (18 Mar 2016 07:38:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2016 07:38:50 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Mar 18 08:38:46 2016 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1agozd-0007KZ-Aq for guile-devel@m.gmane.org; Fri, 18 Mar 2016 08:38:45 +0100 Original-Received: from localhost ([::1]:42057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agozc-0003EW-IS for guile-devel@m.gmane.org; Fri, 18 Mar 2016 03:38:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agozU-0003EF-SL for guile-devel@gnu.org; Fri, 18 Mar 2016 03:38:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agozR-0003rY-MP for guile-devel@gnu.org; Fri, 18 Mar 2016 03:38:36 -0400 Original-Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:36733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agozR-0003rU-F4 for guile-devel@gnu.org; Fri, 18 Mar 2016 03:38:33 -0400 Original-Received: by mail-pf0-x22a.google.com with SMTP id u190so156608401pfb.3 for ; Fri, 18 Mar 2016 00:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:date:organization:mime-version :content-transfer-encoding; bh=1lpqEB0aOkfTs5jfj+d9xtUbLCReQOvcr8LbMR1qPp4=; b=LObGlFkwTIltPCAkaF1AK22Nmm0Xc8xxvfKpfA29qNCN3DeVyAA/auyE+EUv11Ugdt CZ2Xk8JH5OAEvJEbofQQ2huEbaQBen9NWXIIzVG78kZeVz5blHeXPWiuQLpNubg7UdCJ r8H0+wKw7Ki7JI9+Sy1/5+5QSU53QSRjVB5dIPESZW9T7voD4tVRlnyCze4eP0yEwSvK aqFzUqMX1Uo3+q75zaAa50HRJDEdSckj5nSZNcBz+f9M+4eHIcKxa97rjWeFb7fv/UEI JnCBDkDFpuxoA4M8AfQIOwgOl8zK1FYq/2zhg6pqsMEg9EKvrkCtKHIpKQN9E+UfcluZ 6S/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:date:organization :mime-version:content-transfer-encoding; bh=1lpqEB0aOkfTs5jfj+d9xtUbLCReQOvcr8LbMR1qPp4=; b=dXgDA5R/L5V6BMPWqUNno2iRDayQM60BwVEzb/KFX/zea+4EcqG6/YV2rVjO5psr1S U4DJ3UQdneiu9S6hZRjfp/ePi39P8s3w7ivgJSuEnQ+YziIffl9KVPBdJCRvEnljq/eA COSCEz0RUuJ40AHsQYCSun8YIAhGgNpzBKdG1v0xBaEUWXgYAsL55QiuZ1y5d0PA2itU MFb66jH3jPgHZ++8FbXvpObEs3gpiwR5PvoaL3lRPv2qH2f5+jFqMWhxwf6iuBPXlbxs NX84V1oWq7bCdJU+Ptf51T6aW3keOHaphFXQSNe3TdZHZJEqJ89iftl/K1NgfcAmGw2E 7lDQ== X-Gm-Message-State: AD7BkJJProQRdIFo1CJXHOP3YLNeow5IAlZc4EX1GsaoOY1/xcduD/8igR/a15E9o18Q7Q== X-Received: by 10.66.193.131 with SMTP id ho3mr21224881pac.154.1458286712118; Fri, 18 Mar 2016 00:38:32 -0700 (PDT) Original-Received: from [147.2.147.24] ([203.192.156.9]) by smtp.gmail.com with ESMTPSA id q20sm18445803pfi.63.2016.03.18.00.38.30 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Mar 2016 00:38:31 -0700 (PDT) X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22a X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:18234 Archived-At: Hi folks! I'm hacking guile-lua-rebirth these days. It's expected to release a workable version this year. Besides, I can use Artanis from guile-lua-rebirth smoothly. So we may never call Artanis a Scheme framework then. ;-) Well, here's my problem. When we call a function in Lua and it's needed to be compiled, there'll be warning message start with ";;;" which is the comment syntax of Scheme. But it seems our Lua compiler doesn't like it: =======================================log========================================= ;;; note: source file ./language/lua/stdlib/io.scm ;;; newer than compiled /home/nalaginrut/.cache/guile/ccache/2.2-LE-8-3.7/home/nalaginrut/Project/guile-lua-rebirth/language/lua/stdlib/io.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling ./language/lua/stdlib/io.scm ;;; WARNING: compilation of ./language/lua/stdlib/io.scm failed: ;;; ERROR: Syntax error: ;;; ./language/lua/stdlib/io.scm:1:1: Syntax error: unexpected token : in form semi-colon =======================================end========================================== This problem won't cause any error, and Lua works fine. It's just ugly and scare someone. So my suggestion is that we add a helper function to customize the warning message prefix string to make sure it's compatible for the specific language frontend. This feature is useful for our multi-lang plan in the future. Say, for Lua, like this: (set-warning-prefix! "---") ==============================start==================== --- note: source file ./language/lua/stdlib/io.scm --- newer than compiled /home/nalaginrut/.cache/guile/ccache/2.2-LE-8-3.7/home/nalaginrut/Project/guile-lua-rebirth/language/lua/stdlib/io.scm.go --- note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 --- or pass the --no-auto-compile argument to disable. --- compiling ./language/lua/stdlib/io.scm ===============================end===================== What do you think?