Open shionryuu opened 4 months ago
Hi @shionryuu and thanks for reporting! Do you have a project/code snippet you could share to help us troubleshooting the issue?
Also, this seems to be triggered in Salsa itself, in the report_unexpected_cycle
function:
let start_index = query_stack
.iter()
.rposition(|active_query| active_query.database_key_index == database_key_index)
.unwrap();
@shionryuu We'd need a few more info to be able to investigate this. The error suggests some case where a cycle in the code is not handled correctly (e.g. header including itself, behaviours requiring each other, etc).
Maybe you could check the code for a similar pattern and provide a simplified version that triggers this behaviours?
Additionally, you can go visit the ELP settings (e.g. in VS Code) and change "ELP: Log" from error
to debug
. That should give us more info.
FYI @alanz @michalmuskala
Two headers of my project include each other, notifaction disapper if I fix the code.
The following codes will trigger fail notifaction:
$ cat include/common.hrl
-ifndef(__COMMON_H__).
-define(__COMMON_H__, 0).
-include("log.hrl").
-endif.
$ cat include/log.hrl
-ifndef(__LOG_H__).
-define(__LOG_H__, 0).
-include("common.hrl").
-endif.
We do not currently process macro conditionals (-ifndef
). So ELP will currently always include both, which will give a loop.
We do have some protections against cyclic dependencies, but perhaps there are some places where this isn't fully correctly handled:
Describe the bug
erlang-language-platform keep popping up fail notification
To Reproduce**
open project and browse codes
Expected behavior
work normally
Actual behavior
keep popping up fail notification
Context
elp version
): elp 1.1.0+build-2024-05-17