unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [FEATURE REQUEST] Add a hook to print warning message prefix string
@ 2016-03-18  7:38 Nala Ginrut
  2016-03-18 13:10 ` Wette, Matthew R (3441)
  0 siblings, 1 reply; 3+ messages in thread
From: Nala Ginrut @ 2016-03-18  7:38 UTC (permalink / raw)
  To: guile-devel

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?





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-18 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18  7:38 [FEATURE REQUEST] Add a hook to print warning message prefix string Nala Ginrut
2016-03-18 13:10 ` Wette, Matthew R (3441)
2016-03-18 16:30   ` Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).