-
Notifications
You must be signed in to change notification settings - Fork 7
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
Problems with Directory Handling for -d,--dir Flag in NullAway Annotator #238
Comments
@akbarkanso thanks for your report. We're a bit busy with deadlines until August 2, but after that @nimakarimipour will take a look. |
Hi @nimakarimipour, did you get a chance to check the above problem? |
Hi @akbarkanso, Thank you for reporting this issue, and apologies for the delayed response. We were tied up with a deadline but are now available to assist. From your bug report, it seems that the AnnotatorScanner may not be configured correctly. The error message
Regarding the We will update the |
Hi @nimakarimipour ,
My current configuration is as follows: My paths.tsv file available in /path/root/ content:
the command I am running at root: The gradle configuration is passing, and at the end of gradle execution, I can see that the task is failing due to current NullAway violations. In the terminal, after the build result, I see the nonnull_elements.tsv exception mentioned above. |
Additional information: If I run the
However, running |
Thanks for the further info, @akbarkanso. @nimakarimipour maybe we should land #239 and cut a release, so that @akbarkanso can provide more detailed info on what is going on here? |
This PR introduces a check on the `AnnotatorScanner` output and notifies the user if `AnnotatorScanner` is incorrectly configured or has crashed. Before this PR, the Annotator would simply crash with a 'nonnull_elements.tsv not found' error (generated by AnnotatorScanner), which did not clearly indicate the underlying issue. This PR is also related to #238.
@akbarkanso @msridhar Released a new version ( |
Hi @nimakarimipour, I tried with the latest release, and indeed it fails in the recent code you introduced. The failure occurs after checking for the existence of Error message:
I have a feeling that AnnotatorScanner is not configured correctly, but I haven't been able to figure out what I did wrong. I already shared my configuration in my pervious comment. |
Just want to check, did you run with this option enabled? I'm wondering if there is a build failure. If you could run with this output and see if you notice any build failures or crashes that would be great. |
@akbarkanso does your Gradle project have multiple modules or a single module? Sorry we haven't been able to track this down. If there is any way you can create an open-source skeleton project that exhibits the same crashing behavior, that would help us a lot. |
Describe the bug
I encountered issues when using the required -d,--dir flag to specify the directory for output serialization in NullAway Annotator. The tool expects a nonnull_elements.tsv file in the directory, but handling this file results in various exceptions.
To Reproduce
Steps to reproduce the behavior:
Run the NullAway Annotator with the Directory:
java -jar /path/to/annotator-core-1.3.14.jar -d "nullawayResults" .....
Encounter NoSuchFileException:
java.nio.file.NoSuchFileException: nullawayResults/0/nonnull_elements.tsv
Create the missing File:
touch nullawayResults/0/nonnull_elements.tsv
Run the NullAway Annotator Again:
java -jar /path/to/annotator-core-1.3.14.jar -d "nullawayResults" .....
Encounter DirectoryNotEmptyException:
java.nio.file.DirectoryNotEmptyException: nullawayResults/0
Expected behavior
The tool should either:
Stack trace
Stack trace for DirectoryNotEmptyException:
Stack trace for NoSuchFileException:
OS:
Annotator Version
Additional context
My understanding is that the specified directory should be any directory I wish to use for storing outputs. This directory should be a new, empty directory to be used by the tool.
The text was updated successfully, but these errors were encountered: