Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code_review] In SearchfoxAPI class, get sources directly from Searchfox #4816

Open
marco-c opened this issue Feb 10, 2025 · 0 comments
Open

Comments

@marco-c
Copy link
Collaborator

marco-c commented Feb 10, 2025

Since we search functions on "tip" in Searchfox (at least currently) and then get the contents at "commit_hash" (

read_mc_path=lambda path: io.StringIO(
self.get_file(
commit_hash or "tip",
path,
)
),
), sometimes we might have conflicts (especially when analyzing patches based on old commits).

For example, I was running the tool on a revision, and it wanted to know the "ShouldNotProcessUpdatesReasonAsString" function.

We found in on Searchfox at line 4537, but on tip the function moved a bit to line 4525 (https://hg.mozilla.org/mozilla-unified/file/cfc17f0426dd014004b062e7814369bb05a30087/toolkit/xre/nsAppRunner.cpp#l4525).

Instead of getting function lines from Searchfox and source contents from hgmo, we could just get everything from Searchfox (we have the data in the page anyway!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant