Replies: 2 comments 4 replies
-
looping @sameerajayasoma @hevayo @hasithaa @Kishanthan |
Beta Was this translation helpful? Give feedback.
-
I know this is a limitation right now. But this is a safety check added to the type checker, to prevent cascading failures and unintended diagnostics. For example, with the previous implementation, we have seen a type called 'other' in some diagnostics when using VSCode. which is misleading. Even it may create incorrect diagnostics. So bypassing this safety check using a build option, is a bad idea. In order to fix it properly, we need to make the type checker resilient. So I would suggest keeping the current behavior as it is for SwanLake. |
Beta Was this translation helpful? Give feedback.
-
By design, when there's errors in CODE_ANALYZE phase Compiler won't be continued to other phases such as DOC_ANALYZER...etc.
Since this behavior is problematic(and breaks UX) for the tooling experience we had set the isToolingComilation flag when we were using Compiler.compile(). Just after migration to project-api we cannot set this flag since project-api doesn't support this.
https://github.com/ballerina-platform/ballerina-lang/blob/master/compiler/ballerina-lang/src/main/java/io/ballerina/projects/internal/CompilerPhaseRunner.java#L268
Due to above issue, current behavior is that you won't get any diagnostics in latter phases such as documentation issues when there's code-analyzer errors. IMO end of the day IDE users are the real end users of this language. It is bit hard to explain current behavior to the end users. For example something like following, "If you have code-analyzer errors, you won't get any documentation errors".
We are receiving issues such as #27936 due to above
Beta Was this translation helpful? Give feedback.
All reactions