From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: Re-addition of deprecated stuff to 1.7. Date: Sun, 01 Jun 2003 12:56:44 -0700 Organization: Home Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3EDA5A7C.D0FB7603@veritas.com> References: <878yslps9q.fsf@zagadka.ping.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------9F17C0A8C77AC6BD1B083885" X-Trace: main.gmane.org 1054496882 12873 80.91.224.249 (1 Jun 2003 19:48:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 1 Jun 2003 19:48:02 +0000 (UTC) Cc: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jun 01 21:47:58 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19MYo9-0003L7-00 for ; Sun, 01 Jun 2003 21:47:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19MYoa-0004Jv-3w for guile-devel@m.gmane.org; Sun, 01 Jun 2003 15:48:24 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19MYnv-0004GB-1e for guile-devel@gnu.org; Sun, 01 Jun 2003 15:47:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19MYnr-0004E6-Vq for guile-devel@gnu.org; Sun, 01 Jun 2003 15:47:41 -0400 Original-Received: from bay-bridge.veritas.com ([143.127.3.10] helo=bach.veritas.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19MYnq-0004Ax-Fi for guile-devel@gnu.org; Sun, 01 Jun 2003 15:47:38 -0400 Original-Received: from veritas.com (localhost [127.0.0.1]) by bach.veritas.com (Postfix) with ESMTP id 5A28A270D0; Sun, 1 Jun 2003 12:56:44 -0700 (PDT) X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.19-4GB i686) X-Accept-Language: en Original-To: Marius Vollmer Original-cc: guile-devel@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2466 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2466 This is a multi-part message in MIME format. --------------9F17C0A8C77AC6BD1B083885 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Marius Vollmer wrote: > I'd say it is a trade-off between how much pain you are willing to > inflict upon your clients and how much pain you are willing to suffer > yourself. > > I think (and hope) it is entirely tolerable to require you clients to > install Guile 1.6 when they want to compile your code. As the author of a piece of code that is relatively obscure, it is tough enough to get it test-driven, let alone test-driven after they have had to upgrade something else. Current distributions are still using 1.4 (leastwise the latest Red Hat 7.x and SuSE 8.1 use it). These releases are not even a year old yet. It *will* be a couple of years before it is reasonable to expect all potential clients to have 1.6. > > May I please encourage you to supply configury stuff that is capable > > of adapting current interfaces to old Guiles? > > Too much work for too little gain, I'd say. Instead, we should make > it as easy as possible to install Guile 1.6 so that there is no reason > not to have it on ones system. I sent some macros, tho I coded around the need to use it myself. > These configure snippets might be collected in a central place, maybe, > when people are willing to maintain such a thing. That's what I was suggesting... > But given the above, I think it is OK to just fail and require Guile > 1.6. Too early. > There are two [main] reasons... to want stability in an interface: > one is that your code works unchanged with multiple > versions/implementations of the other side of the API, another is that > you don't want to do the work of tracking the changes in an API. > In my opinion, the first reason is not very valid for Guile; there > should be no reason to require some code to compile _unchanged_ > against multiple versions of Guile. When there are such reasons, we > should work to remove the reasons, not to make it easier to compile > _unchanged_. I don't want to really say, "unchanged". I do want to say that the compatibility glue is important. I am now developing against 1.6. However, as much as you would like to see 1.4 retired, the bulk of the distributions at this time have 1.4. I need to be able to jigger what I use so it can adapt to whatever is locally installed. By the time the bulk of installations are running 1.6, you'll be shipping 1.8 and using the same arguments. > Note the emphasis on _unchanged_. Not wanting to do much work when > tracking API changes is a very good position to take. I'm taking both positions (I get to, I'm not developing Guile ;-). But I'm also willing to share what I've done. (Attached are two configury macros. One to find libguile, even on systems where guile-config was omitted [Red Hat], the other to detect 1.4 systems and provide #define glue for scm_eval_x and scm_port.) > When changing > the Guile API, we should make it in such a way that client code needs > to change as little as possible. This often means that it doesn't > need to change at all. However, it is not an unbreakable requirement > that client code must continue to compile with all new versions of > Guile. That's a little extreme. OTOH, when you retire ``scm_port'' you could also add: #if (THE_LAST_GUILE_VERSION_I_KNEW_ABOUT < GUILE_VERSION_1_6) # define scm_port scm_t_port #endif and delete that code only after 1.6 has been in the major distros for a couple of years. The Guile version I understand is a mix of 1.4 and 1.6 'cuz I'm transitioning. The attached configury checks for 1.4 and does the reverse #define: /* Define this if no scm_t_port */ #define scm_t_port scm_port > It is of course good practice to minimize the needed changes, I'm sure you do your best. One's best cannot ever be perfect. > > P.S. If _anyone_ can show me how to set the string port file > > name and line number, I *sure* would be a happy camper. > > I'm getting to that in a few minutes... :-) Cool. :-D --------------9F17C0A8C77AC6BD1B083885 Content-Type: text/plain; charset=us-ascii; name="libguile.m4" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libguile.m4" AC_DEFUN([AG_WITHLIB_GUILE],[ AC_ARG_WITH([libguile], AC_HELP_STRING([--with-libguile], [libguile installation prefix]), [ag_cv_with_libguile_root=${with_libguile}], AC_CACHE_CHECK([whether with-libguile was specified], ag_cv_with_libguile_root, ag_cv_with_libguile_root=no) ) # end of AC_ARG_WITH libguile if test "${with_libguile+set}" = set && \ test "${withval}" = no then ## disabled by request ag_cv_with_libguile_root=no ag_cv_with_libguile_cflags=no ag_cv_with_libguile_libs=no else AC_ARG_WITH([libguile-cflags], AC_HELP_STRING([--with-libguile-cflags], [libguile compile flags]), [ag_cv_with_libguile_cflags=${with_guile_cflags}], AC_CACHE_CHECK([whether with-libguile-cflags was specified], ag_cv_with_libguile_cflags, ag_cv_with_libguile_cflags=no) ) # end of AC_ARG_WITH libguile-cflags AC_ARG_WITH([libguile-libs], AC_HELP_STRING([--with-libguile-libs], [libguile link command arguments]), [ag_cv_with_libguile_libs=${with_guile_libs}], AC_CACHE_CHECK([whether with-libguile-libs was specified], ag_cv_with_libguile_libs, ag_cv_with_libguile_libs=no) ) # end of AC_ARG_WITH libguile-libs case "X${ag_cv_with_libguile_cflags}" in Xyes|Xno|X ) case "X${ag_cv_with_libguile_root}" in Xyes|Xno|X ) ag_cv_with_libguile_cflags=no ;; * ) ag_cv_with_libguile_cflags=-I${ag_cv_with_libguile_root}/include ;; esac esac case "X${ag_cv_with_libguile_libs}" in Xyes|Xno|X ) case "X${ag_cv_with_libguile_root}" in Xyes|Xno|X ) ag_cv_with_libguile_libs=no ;; * ) ag_cv_with_libguile_libs="-L${ag_cv_with_libguile_root}/lib -lguile";; esac esac ag_save_CPPFLAGS="${CPPFLAGS}" ag_save_LIBS="${LIBS}" case "X${ag_cv_with_libguile_cflags}" in Xyes|Xno|X ) f=`guile-config compile 2>/dev/null` || f='' test -n "${f}" && ag_cv_with_libguile_cflags="${f}" && \ AC_MSG_NOTICE([guile-config used for CFLAGS: $f]) ;; esac case "X${ag_cv_with_libguile_libs}" in Xyes|Xno|X ) f=`guile-config link 2>/dev/null` || f='' test -n "${f}" && ag_cv_with_libguile_libs="${f}" && \ AC_MSG_NOTICE([guile-config used for LIBS: $f]) ;; esac fi ## disabled by request case "X${ag_cv_with_libguile_cflags}" in Xyes|Xno|X ) ag_cv_with_libguile_cflags="" ;; * ) CPPFLAGS="${CPPFLAGS} ${ag_cv_with_libguile_cflags}" ;; esac case "X${ag_cv_with_libguile_libs}" in Xyes|Xno|X ) LIBS="${LIBS} -lguile" ag_cv_with_libguile_libs="-lguile" ;; * ) LIBS="${LIBS} ${ag_cv_with_libguile_libs}" ;; esac LIBGUILE_CFLAGS="" LIBGUILE_LIBS="" AC_MSG_CHECKING([whether libguile can be linked with]) AC_CACHE_VAL([ag_cv_with_libguile],[ AC_LINK_IFELSE([[@%:@include @%:@include int main () { SCM fumble, bumble, stumble; stumble = scm_cons( fumble, bumble ); stumble = scm_display( fumble, bumble ); stumble = scm_ilength( fumble ); stumble = scm_makstr( 1, 2 ); stumble = gh_eval_str( "stumble" ); scm_misc_error( "oops", "bad", bumble ); stumble = scm_num_eq_p( fumble, bumble ); scm_wrong_type_arg( "oops", 1, bumble ); return 0; }]], [ag_cv_with_libguile=yes], [ag_cv_with_libguile=no]) # end of AC_LINK_IFELSE ]) # end of AC_CACHE_VAL for ag_cv_with_libguile AC_MSG_RESULT([${ag_cv_with_libguile}]) AC_SUBST([LIBGUILE_CFLAGS]) AC_SUBST([LIBGUILE_LIBS]) AC_SUBST([LIBGUILE_PATH]) if test "X${ag_cv_with_libguile}" != Xno then[ LIBGUILE_CFLAGS="${ag_cv_with_libguile_cflags}" LIBGUILE_LIBS="${ag_cv_with_libguile_libs}" case "${LIBGUILE_LIBS}" in *-L* ) LIBGUILE_PATH=`echo ${LIBGUILE_LIBS} | sed 's/.*-L[ ]*//;s/[ ].*//'` ;; * ) LIBGUILE_PATH='' ;; esac] CPPFLAGS="@S|@{ag_save_CPPFLAGS}" LIBS="@S|@{ag_save_LIBS}" else CPPFLAGS="${ag_save_CPPFLAGS}" LIBS="${ag_save_LIBS}" LIBGUILE_CFLAGS='' LIBGUILE_LIBS='' LIBGUILE_PATH='' AC_MSG_ERROR([Cannot find working libguile]) fi AC_SUBST([AG_GUILE]) ]) # end of AC_DEFUN of AG_WITHLIB_GUILE AC_DEFUN([AG_LINK_EVAL_STRING],[ AC_MSG_CHECKING([whether scm_primitive_eval_x links]) AC_CACHE_VAL([ag_cv_link_eval_string],[ ag_save_CPPFLAGS="${CPPFLAGS}" CPPFLAGS="${ag_cv_with_libguile_cflags} ${CPPFLAGS}" ag_save_LIBS="${LIBS}" LIBS="${ag_cv_with_libguile_libs} ${LIBS}" AC_TRY_LINK([@%:@include @%:@include ], [SCM res = scm_primitive_eval_x( SCM_UNDEFINED );], [ag_cv_link_eval_string=yes],[ag_cv_link_eval_string=no] ) # end of TRY_LINK CPPFLAGS="${ag_save_CPPFLAGS}" LIBS="${ag_save_LIBS}" ]) # end of AC_CACHE_VAL for ag_cv_link_eval_string AC_MSG_RESULT([${ag_cv_link_eval_string}]) if test "X${ag_cv_link_eval_string}" = Xno then AC_DEFINE([scm_primitive_eval_x], [scm_eval_x], [Define this if no scm_primitive_eval_x]) AC_DEFINE([scm_t_port], [scm_port], [Define this if no scm_t_port]) fi ]) # end of AC_DEFUN of AG_LINK_EVAL_STRING --------------9F17C0A8C77AC6BD1B083885 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --------------9F17C0A8C77AC6BD1B083885--