Skip to content
New issue

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

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

Already on GitHub? # to your account

EclipseErrorReporter reports errors in the wrong file #1030

Closed
petervdonovan opened this issue Mar 11, 2022 · 2 comments · Fixed by #1038
Closed

EclipseErrorReporter reports errors in the wrong file #1030

petervdonovan opened this issue Mar 11, 2022 · 2 comments · Fixed by #1038
Labels
bug Something isn't working

Comments

@petervdonovan
Copy link
Collaborator

I am not sure if this problem is on my end or if it is on the Eclipse side. The path I provide to EclipseErrorReporter is /resource/temp/src/TraceTesting.lf, but the resource that comes from invoking FileUtil.getIResource is null.

This causes warnings to be reported on the main file on the wrong lines in cases where they should be reported on the imported file instead. This can be reproduced by opening the Python version of ModalActions.lf in Epoch.

@lhstrh
Copy link
Member

lhstrh commented Mar 11, 2022

This sounds like it has to do with the recent changes to FileConfig. @cmnrd: can you have a look?

@cmnrd
Copy link
Collaborator

cmnrd commented Mar 11, 2022

I can't reproduce this. When I compile ModalActions.lf. I only get a large error message appearing on top of the file. But there are no warnings reported.

I was investigating this nonetheless. I found that error reporting for C examples for errors in C code in imported reactors is also broken and shows the same symptoms as you describe. However, this appears to be caused by erroneous paths passed to the error reporter. For some reason, the provided path is missing the initial /. So the path given to the error reporter is some/path instead of /some/path. I suspect the error parsing done in the C generator, but I was not able to find the root cause.

I am not sure where exactly and how you are trying to report an error. However, any path given to the error reporter is expected to be a filesystem path. It looks like what you provide is a resource. You can convert a resource to an FS path with FileUtile.toPath.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants