Skip to content

Commit

Permalink
use request option rather than feature flag
Browse files Browse the repository at this point in the history
Summary: use new request option introduced in D66724863 rather than feature flag

Reviewed By: donsbot

Differential Revision: D67713238

fbshipit-source-id: 60b4240f59f9c93d22ff28be2deddb22a0579184
  • Loading branch information
Philippe Bidinger authored and facebook-github-bot committed Jan 2, 2025
1 parent 47b6d84 commit 08e442c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"}
Original file line number Diff line number Diff line change
@@ -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"}
Original file line number Diff line number Diff line change
@@ -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"}
Original file line number Diff line number Diff line change
@@ -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"}

0 comments on commit 08e442c

Please sign in to comment.