mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Only pass a proxy to callGraphRubyProject.
This commit is contained in:
parent
ae0dc77ead
commit
58f560e4a2
@ -105,14 +105,14 @@ evalTypeScriptProject = justEvaluating <=< evaluateProject (Proxy :: Proxy 'Lang
|
|||||||
|
|
||||||
typecheckGoFile = checking <=< evaluateProjectWithCaching (Proxy :: Proxy 'Language.Go) goParser Language.Go
|
typecheckGoFile = checking <=< evaluateProjectWithCaching (Proxy :: Proxy 'Language.Go) goParser Language.Go
|
||||||
|
|
||||||
callGraphProject parser proxy lang opts paths = runTaskWithOptions opts $ do
|
callGraphProject parser proxy opts paths = runTaskWithOptions opts $ do
|
||||||
blobs <- catMaybes <$> traverse readFile (flip File lang <$> paths)
|
blobs <- catMaybes <$> traverse readFile (flip File (Language.reflect proxy) <$> paths)
|
||||||
package <- parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs lang [])
|
package <- parsePackage parser (Project (takeDirectory (maybe "/" fst (uncons paths))) blobs (Language.reflect proxy) [])
|
||||||
modules <- topologicalSort <$> runImportGraphToModules proxy package
|
modules <- topologicalSort <$> runImportGraphToModules proxy package
|
||||||
x <- runCallGraph proxy False modules package
|
x <- runCallGraph proxy False modules package
|
||||||
pure (x, (() <$) <$> modules)
|
pure (x, (() <$) <$> modules)
|
||||||
|
|
||||||
callGraphRubyProject = callGraphProject rubyParser (Proxy @'Language.Ruby) Language.Ruby debugOptions
|
callGraphRubyProject = callGraphProject rubyParser (Proxy @'Language.Ruby) debugOptions
|
||||||
|
|
||||||
-- Evaluate a project consisting of the listed paths.
|
-- Evaluate a project consisting of the listed paths.
|
||||||
evaluateProject proxy parser lang paths = withOptions debugOptions $ \ config logger statter ->
|
evaluateProject proxy parser lang paths = withOptions debugOptions $ \ config logger statter ->
|
||||||
|
Loading…
Reference in New Issue
Block a user