Assertion error bug and reproduction
DrakeEvans opened this issue · 7 comments
Verbose messages from language server:
[Trace - 3:17:12 PM] Sending request 'textDocument/documentSymbol - (9)'.
Params: {
"textDocument": {
"uri": "file:///Users/ade/repos/fraxlend-oracles-dev/script/deploy/DeployAaveTokenDualOracle.s.sol"
}
}
[Trace - 3:17:20 PM] Received notification 'window/logMessage'.
Params: {
"type": 1,
"message": "Traceback (most recent call last):\n File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/server.py", line 264, in _task_done_callback\n task.result()\n File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/lsp_compiler.py", line 181, in run\n await self.__compilation_loop()\n File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/lsp_compiler.py", line 880, in __compilation_loop\n await self.__compile(self.__discovered_files)\n File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/lsp_compiler.py", line 797, in __compile\n self.__ir_reference_resolver.run_post_process_callbacks(\n File "/opt/homebrew/lib/python3.10/site-packages/woke/ast/ir/reference_resolver.py", line 103, in run_post_process_callbacks\n callback(callback_params)\n File "/opt/homebrew/lib/python3.10/site-packages/woke/ast/ir/expression/identifier.py", line 50, in _post_process\n referenced_declaration = self.referenced_declaration\n File "/opt/homebrew/lib/python3.10/site-packages/woke/ast/ir/expression/identifier.py", line 100, in referenced_declaration\n assert isinstance(node, DeclarationAbc)\nAssertionError\n"
}
[Error - 3:17:20 PM] Traceback (most recent call last):
File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/server.py", line 264, in _task_done_callback
task.result()
File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/lsp_compiler.py", line 181, in run
await self.__compilation_loop()
File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/lsp_compiler.py", line 880, in __compilation_loop
await self.__compile(self.__discovered_files)
File "/opt/homebrew/lib/python3.10/site-packages/woke/lsp/lsp_compiler.py", line 797, in __compile
self.__ir_reference_resolver.run_post_process_callbacks(
File "/opt/homebrew/lib/python3.10/site-packages/woke/ast/ir/reference_resolver.py", line 103, in run_post_process_callbacks
callback(callback_params)
File "/opt/homebrew/lib/python3.10/site-packages/woke/ast/ir/expression/identifier.py", line 50, in _post_process
referenced_declaration = self.referenced_declaration
File "/opt/homebrew/lib/python3.10/site-packages/woke/ast/ir/expression/identifier.py", line 100, in referenced_declaration
assert isinstance(node, DeclarationAbc)
AssertionError
[Error - 3:17:20 PM] The Tools for Solidity server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Ive added @michprev to the repo here: https://github.com/FraxFinance/fraxlend-oracles-dev to see reproduction. Please reach out on telegram @drakeevans
if you have questions. Happy to hop on zoom and reproduce/debug together. I have auto install woke unselected and am currently using woke v 3.3.0
Actually I see this is just a repeat of #233 will close
@DrakeEvans I don't think this is the same issue as #233. The referenced issue should be fixed in Woke 3.3.0.
Also, the trace log points to a different location in the source code.
Hmm it was actually in the form of import "path/to/foo" as foo
. I will create a reproduction repo
@michprev Here is a reproduction repo https://github.com/DrakeEvans/tools-for-solidity-bug/blob/master/test/Counter.t.sol
If you visit that file server will crash. I am on woke version 3.3.0
So it may be something in the Constants.sol file
Closing this as the reproduction repository is no longer available, the issue was probably fixed in the latest major release.