Closed
Bug 457732
Opened 17 years ago
Closed 6 years ago
mxr fails to find some regular expression matches
Categories
(Webtools Graveyard :: MXR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: nelson, Unassigned)
References
()
Details
I want to search through all the files in nss/lib for instances of
pk11_FindObjectByTemplate or
pk11_FindObjectsByTemplate
So I did a case-sensitive regular expression MXR search on the expression
pk11_FindObjects*ByTemplate in nss/lib of tree security. The URL was
http://mxr.mozilla.org/security/search?string=pk11_FindObjects*ByTemplate®exp=on&case=on&find=nss%2Flib&tree=security
The result claimed to have found 22 matching lines in 6 files.
But the correct result, which I got later from these searches in my own
source tree starting in nss/lib:
find . -name \*.[ch] | xargs grep -l 'pk11_FindObjects*ByTemplate' | wc -l
find . -name \*.[ch] | xargs grep 'pk11_FindObjects*ByTemplate' | wc -l
includes 27 matching lines in 9 files.
This tells me that when I'm searching through NSS source code, trying to
find all the callers of a function, or users of a macro, etc.,
I CANNOT rely on the output of MXR and know that I have found them all.
That makes MXR pretty useless. This is major, maybe more.
| Reporter | ||
Comment 1•17 years ago
|
||
If I change the search expression from
pk11_FindObjects*ByTemplate to
pk11_FindObject.*ByTemplate
it finds all 27 matching lines in 9 files.
Of course, that more general expression has the potential to find many
matches that I don't want. In this case, I got lucky.
http://mxr-test.konigsberg.mozilla.org/security/search?string=pk11_FindObject&find=nss%2Flib&filter=pk11_FindObjects%3FByTemplate
does what you want. the mxr.mozilla.org tree is having indexing issues, but conceptually you want a perl regexp. just use a reasonably accurate fast glimpse search and then use a perl regexp in filter to get precisely what you want.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 3•17 years ago
|
||
No, I don't want to have to use two separate regular expression grammars,
and to understand the limitations of the flawed glimpse engine.
I don't know perl regexp grammar and don't want to.
What I really want is grep expressions. I'd settle for using the documented
glimpse grammar, if it worked. But as it stands, it's broken. It does not
conform to its own specification.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
| Reporter | ||
Comment 4•17 years ago
|
||
oh, and the konigsberg URL doesn't work for me.
Comment 5•6 years ago
|
||
mxr is gone, mass closing.
https://searchfox.org/ is a much better alternative.
Status: REOPENED → RESOLVED
Closed: 17 years ago → 6 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•