Skip to content

search: add query parser migration flag

Administrator requested to merge rvt/parser-migration-flag into master

Created by: rvantonder

Part of https://github.com/sourcegraph/sourcegraph/issues/10844. This flag allows to use the new parser for all queries. This is to help the transition/migration. Mainly, if there is a show-stopping bug in the new parser, the flag is a fallback to the previous parser until a fix can happen.

I am disabling it by default, because I want to do some differential testing first, and then I'll enable it on Sourcegraph.com. When enabled, it'll solve a lot of existing issues (see https://github.com/sourcegraph/sourcegraph/issues/8780).

Side question: I actually wanted to make this a user/org/global setting, but I need a handle to ctx for that, but can't get a context inside the NewSearchImplementer function, so 🤷.

Example query that works when the flag is enabled: repo:^github\.com/sourcegraph/sourcegraph$ query:

Merge request reports

Loading