guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion: Update-helper for guile users


From: Dirk Herrmann
Subject: Suggestion: Update-helper for guile users
Date: Mon, 25 Sep 2000 12:52:36 +0200 (MEST)

Hello!

We know that the development of guile from time to time makes it necessary
to change names, deprecate stuff, change function signatures and so
on.  Currently, the only way for a user to get information about such
changes is the NEWS file.

What about the following idea:  We provide a guile application that helps
to find and potentially update places in user code that should be
inspected due to changes to the API.  This tool would read a config file,
that is a scheme representation of that part of NEWS, which may influence
existing user code.  When called, the tool gets a set of input files that
are to be checked.  A first idea about the config file:

Each entry has the following fields:
* a regexp:  If a match is found in the file that is being checked, this
  indicates that there might be a problem with the new version.
* a comment, that describes the problem to the user.
* a list of potential replacements

Each replacement has the following fields:
* an output regexp, that replaces the regexp with the updated code.
  If things can not easily be replaced by regexp matching and
  substituting, then this is just 'manual or #f.
* a comment, that explains the changes and in which cases this replacement
  should be performed, or, in case of a manual replacement, what the user
  should do.

Config files are separate for different guile distributions.  For example,
there might be such a file for transition from guile-1.4 to guile-1.5, but
after guile-1.5 is released, new things would be put into a config file
for transition from guile-1.5 to guile-1.6.

The tool might operate in different modes:  
* batch mode just writes the positions of the suspicious places to stdout,
  the format should be parsable by emacs to jump to the corresponding
  places.  No replacements are performed.
* Interactive.  Every suspicious place is shown (with a few context
  lines), and the alternative are listed.  The user can select a
  replacement, or preview the code if the replacement was applied
  etc.  Also, the user may just let the position get protocolled as in
  batch mode in order to check certain places later.

One could also think of more possible options and extensions, like an
option for automatic update of simple renamings etc.

Probably this isn't a new idea at all, but I can't remember that we had a
discussion about it.  What do you think?  Is this feasible and does it
make sense?  Could it help _us developers_ to be a little less
conservative when it comes to think about changes to the API?

Best regards
Dirk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]