Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 13356] config_query gets slower as CONFIGURE progresses

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 13356] config_query gets slower as CONFIGURE progresses
  • Date: 30 Dec 2006 19:22:01 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13356





------- Additional Comments From acedit AT armory.com 2006-12-30 13:21 -------
This looks good. I dont cant find a documented reason for using grep, although
I'll speculate that it allows regular expressions as search tokens. I wonder
if
any spell uses it that way. I cant think of a place where sorcery does. In
anycase the intended usage and type of pattern match should be made more
explicit. The old one is grep regexp, the new one is glob based, alternatively
it could be exact. I think exact matching would be better, because its safer.
Callers dont need to backquote their search patterns (or remember to think
about
it).

You can see the original versions with git show
f213bd265fa6e294ff68da09cba58906a1903e7d

We ought to look through the grimoire for any strange usages, just in case
anyone is using regexps and fix them. Jaka is correct, this is very delicate
code.

There should be unit tests in perforce. I have a checkout of them and took the
liberty of testing it myself. The new implementation passes all 8 tests (as
does
the old one). Which incidentally means that bug 8016 remains fixed.

In the proposed function double-quote $@. The *'s in the [[ ]] make me
nervous,
I worry that bash will expand it to a directory listing in some cases. The
function does not pass the unit tests with the pattern quoted though. It might
be safer to loop through the list items and compare them individually, even
though thats slower, its safer. This of course touches on the issue of what
characters are valid for list items.



--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page