From 08e442cac3892d8f9902ab6e78aca70dae09f0fd Mon Sep 17 00:00:00 2001 From: Philippe Bidinger Date: Thu, 2 Jan 2025 03:58:55 -0800 Subject: [PATCH] use request option rather than feature flag Summary: use new request option introduced in D66724863 rather than feature flag Reviewed By: donsbot Differential Revision: D67713238 fbshipit-source-id: 60b4240f59f9c93d22ff28be2deddb22a0579184 --- .../regression/lib/Glean/Glass/Regression/Snapshot.hs | 9 ++------- .../regression/tests/cpp-xlang/documentSymbolIndex.query | 2 +- .../regression/tests/cpp-xlang/documentSymbolListX.query | 2 +- .../tests/hack-xlang/documentSymbolIndex.query | 2 +- .../tests/hack-xlang/documentSymbolListX.query | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs b/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs index 04a52db7e..8cf19e0f0 100644 --- a/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs +++ b/glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs @@ -179,17 +179,12 @@ mkTest cfgReplace get name qfile tempDir = TestLabel name $ TestCase $ do then copyFile actual expected else diff actual expected -xlang :: RequestOptions -> RequestOptions -xlang opts = opts { requestOptions_feature_flags = Just - (def { featureFlags_include_xlang_refs = Just True }) -} - evalQuery :: Glass.Env -> FilePath -> Query -> FilePath -> IO () evalQuery glassEnv qFile Query{..} oFile = case action of "documentSymbolListX" -> withObjectArgs qFile oFile args - (\req opts -> Glass.documentSymbolListX glassEnv req (xlang opts)) + (\req opts -> Glass.documentSymbolListX glassEnv req opts) "documentSymbolIndex" -> withObjectArgs qFile oFile args - (\req opts -> Glass.documentSymbolIndex glassEnv req (xlang opts)) + (\req opts -> Glass.documentSymbolIndex glassEnv req opts) "findReferenceRanges" -> withSymbolId oFile args (Glass.findReferenceRanges glassEnv) "symbolLocation" -> withSymbolId oFile args diff --git a/glean/glass/test/regression/tests/cpp-xlang/documentSymbolIndex.query b/glean/glass/test/regression/tests/cpp-xlang/documentSymbolIndex.query index 635af414a..eac3d84a9 100644 --- a/glean/glass/test/regression/tests/cpp-xlang/documentSymbolIndex.query +++ b/glean/glass/test/regression/tests/cpp-xlang/documentSymbolIndex.query @@ -1,2 +1,2 @@ action: documentSymbolIndex -args: {"include_refs":true,"filepath":"test.cpp","repository":"test-xlang"} +args: {"include_xlang_refs":true,"include_refs":true,"filepath":"test.cpp","repository":"test-xlang"} diff --git a/glean/glass/test/regression/tests/cpp-xlang/documentSymbolListX.query b/glean/glass/test/regression/tests/cpp-xlang/documentSymbolListX.query index 251b00a11..b057ce5d5 100644 --- a/glean/glass/test/regression/tests/cpp-xlang/documentSymbolListX.query +++ b/glean/glass/test/regression/tests/cpp-xlang/documentSymbolListX.query @@ -1,2 +1,2 @@ action: documentSymbolListX -args: {"include_refs":true,"filepath":"test.cpp","repository":"test-xlang"} +args: {"include_xlang_refs":true,"include_refs":true,"filepath":"test.cpp","repository":"test-xlang"} diff --git a/glean/glass/test/regression/tests/hack-xlang/documentSymbolIndex.query b/glean/glass/test/regression/tests/hack-xlang/documentSymbolIndex.query index 35f549170..c0dbda68c 100644 --- a/glean/glass/test/regression/tests/hack-xlang/documentSymbolIndex.query +++ b/glean/glass/test/regression/tests/hack-xlang/documentSymbolIndex.query @@ -1,2 +1,2 @@ action: documentSymbolIndex -args: {"include_refs":true,"filepath":"www/test.php","repository":"test-xlang"} +args: {"include_xlang_refs":true,"include_refs":true,"filepath":"www/test.php","repository":"test-xlang"} diff --git a/glean/glass/test/regression/tests/hack-xlang/documentSymbolListX.query b/glean/glass/test/regression/tests/hack-xlang/documentSymbolListX.query index 38d92e9b7..bdc147d47 100644 --- a/glean/glass/test/regression/tests/hack-xlang/documentSymbolListX.query +++ b/glean/glass/test/regression/tests/hack-xlang/documentSymbolListX.query @@ -1,2 +1,2 @@ action: documentSymbolListX -args: {"include_refs":true,"filepath":"www/test.php","repository":"test-xlang"} +args: {"include_xlang_refs":true,"include_refs":true,"filepath":"www/test.php","repository":"test-xlang"}