Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/ the compile function hides "data reference not resolved" errors in case of "an operation not implemented" errors #585

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

lanarimarco
Copy link
Collaborator

Description

Since the compile function was designed to serialize the CompilationUnit, if there is at least one error before serialization, the function must throw an error. However, due to technical reasons, we must serialize the CompilationUnit before calling CompilationUnit.resolveAndValidate, which means we might miss information about unresolved data reference errors.

To address this issue, the compile function has been refactored. If the out parameter is passed as null, it indicates that the method is being used solely for syntax checking. In this case, all errors, including unresolved data references, will be reported before the function throws the final error.

Checklist:

  • There are tests for this feature.
  • The code follows Kotlin conventions (run ./gradlew ktlintCheck).
  • The code passes all tests (run ./gradlew check).
  • There is specific documentation in the docs directory.

…lidate in order to fire also data reference not reolved errors
@lanarimarco lanarimarco merged commit 8864680 into develop Aug 1, 2024
1 check passed
@lanarimarco lanarimarco deleted the bugfix/not_impl_errors_hide_not_resolved branch August 1, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant