unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#20645: sxml xpath exports "filter"
@ 2015-05-24 15:34 Matt Wette
  2016-02-09  4:03 ` Matt Wette
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Wette @ 2015-05-24 15:34 UTC (permalink / raw)
  To: 20645

sxml xpath exports "filter" which is incompatible with the common procedure of the same name.

I suggest renaming unless it breaks a lot of code.

I use

  #:use-module ((sxml xpath)
		#:renamer (lambda (s) (if (eq? s 'filter) 'xp-filter s)))

but would rather other agree that renaming in sxml/xpath.scm is better.

Matt






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

* bug#20645: sxml xpath exports "filter"
  2015-05-24 15:34 bug#20645: sxml xpath exports "filter" Matt Wette
@ 2016-02-09  4:03 ` Matt Wette
  2016-02-09 14:16   ` Thompson, David
  2016-02-11  6:57   ` Mark H Weaver
  0 siblings, 2 replies; 5+ messages in thread
From: Matt Wette @ 2016-02-09  4:03 UTC (permalink / raw)
  To: 20645

This is a very annoying "bug".  The (sxml xpath) “filter” procedure overrides the builtin guile “filter”.

I believe the fix can be implemented with the following changes to (sxml xpath):
1) (define node-filter filter)
2) In the #:export list, replace “filter” with “node-filter”

Matt






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

* bug#20645: sxml xpath exports "filter"
  2016-02-09  4:03 ` Matt Wette
@ 2016-02-09 14:16   ` Thompson, David
  2016-02-11  6:57   ` Mark H Weaver
  1 sibling, 0 replies; 5+ messages in thread
From: Thompson, David @ 2016-02-09 14:16 UTC (permalink / raw)
  To: Matt Wette; +Cc: 20645

On Mon, Feb 8, 2016 at 11:03 PM, Matt Wette <mwette@alumni.caltech.edu> wrote:
> This is a very annoying "bug".  The (sxml xpath) “filter” procedure overrides the builtin guile “filter”.
>
> I believe the fix can be implemented with the following changes to (sxml xpath):
> 1) (define node-filter filter)
> 2) In the #:export list, replace “filter” with “node-filter”

Is this really a bug?  The module system allows names to have
different meanings without conflicting in a global namespace.  When
importing a module, you can choose which symbols to import, or prefix
all of the symbols with something.

- Dave





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

* bug#20645: sxml xpath exports "filter"
  2016-02-09  4:03 ` Matt Wette
  2016-02-09 14:16   ` Thompson, David
@ 2016-02-11  6:57   ` Mark H Weaver
  2016-06-23 16:42     ` Mark H Weaver
  1 sibling, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2016-02-11  6:57 UTC (permalink / raw)
  To: Matt Wette; +Cc: 20645

Matt Wette <mwette@alumni.caltech.edu> writes:

> This is a very annoying "bug".  The (sxml xpath) “filter” procedure overrides the builtin guile “filter”.
>
> I believe the fix can be implemented with the following changes to (sxml xpath):
> 1) (define node-filter filter)
> 2) In the #:export list, replace “filter” with “node-filter”

We can't do this because it would break existing code that uses 'filter'
from (sxml xpath), and also introduce a Guile-specific change to the API
of a portable library.

However, you can rename 'filter' at import time as follows:

  (use-modules ((sxml xpath) #:select ((filter . node-filter))))

Does this work for you?

    Mark





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

* bug#20645: sxml xpath exports "filter"
  2016-02-11  6:57   ` Mark H Weaver
@ 2016-06-23 16:42     ` Mark H Weaver
  0 siblings, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2016-06-23 16:42 UTC (permalink / raw)
  To: Matt Wette; +Cc: 20645-done

Mark H Weaver <mhw@netris.org> writes:

> Matt Wette <mwette@alumni.caltech.edu> writes:
>
>> This is a very annoying "bug".  The (sxml xpath) “filter” procedure overrides the builtin guile “filter”.
>>
>> I believe the fix can be implemented with the following changes to (sxml xpath):
>> 1) (define node-filter filter)
>> 2) In the #:export list, replace “filter” with “node-filter”
>
> We can't do this because it would break existing code that uses 'filter'
> from (sxml xpath), and also introduce a Guile-specific change to the API
> of a portable library.
>
> However, you can rename 'filter' at import time as follows:
>
>   (use-modules ((sxml xpath) #:select ((filter . node-filter))))
>
> Does this work for you?

Having not heard back for 19 weeks, I'm closing this bug now.

      Mark





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

end of thread, other threads:[~2016-06-23 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-24 15:34 bug#20645: sxml xpath exports "filter" Matt Wette
2016-02-09  4:03 ` Matt Wette
2016-02-09 14:16   ` Thompson, David
2016-02-11  6:57   ` Mark H Weaver
2016-06-23 16:42     ` Mark H Weaver

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).