mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Temporary trace to show when we are circular loading
This commit is contained in:
parent
04d8e06b5f
commit
f2443a7f31
@ -209,11 +209,11 @@ load name = askModuleTable >>= maybeM notFound . ModuleTable.lookup name >>= eva
|
||||
LoadStack{..} <- getLoadStack
|
||||
if mPath `elem` unLoadStack
|
||||
then do -- Circular load, don't keep evaluating.
|
||||
v <- unit
|
||||
v <- trace ("load (skip evaluating, circular load): " <> show mPath) unit
|
||||
pure (mempty, v)
|
||||
else do
|
||||
modifyLoadStack (loadStackPush mPath)
|
||||
v <- evaluateModule x
|
||||
v <- trace ("load (evaluating): " <> show mPath) $ evaluateModule x
|
||||
modifyLoadStack loadStackPop
|
||||
env <- filterEnv <$> getExports <*> getEnv
|
||||
modifyModuleTable (ModuleTable.insert name (env, v))
|
||||
|
Loading…
Reference in New Issue
Block a user