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

Filter files with custom options being built #53

Merged
merged 11 commits into from
Jan 21, 2022

Conversation

alexander-yevsyukov
Copy link
Collaborator

This PR fixes an issue resulted in ClassNotFoundException when trying to load custom options form a proto file containing custom options and being built by ProtoData.

Recently, instead of specifying option files, we started detecting them by the presence of extensions (FileDescriptor.getExtensions()). It works well until we try to use ProtoData on a newly created proto file with custom extensions declared, but without outer class generated yet. Until this PR we attempted to load a Java class by the name corresponding to the given descriptor. Since there was no Java file produced at this stage, the attempt failed with ClassNotFoundException.

This PR fixes the issue by skipping the proto files without outer class already available.

@alexander-yevsyukov
Copy link
Collaborator Author

@armiol, recent Ubuntu builds failed because of an issue uploading Codecov reports. It looks similar to this one. I've switched off the flag failing CI for now.

@alexander-yevsyukov alexander-yevsyukov changed the title Filter option files being built Filter files with custom options being built Jan 21, 2022
Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexander-yevsyukov LGTM with a single minor comment.

@alexander-yevsyukov alexander-yevsyukov merged commit da07b8d into master Jan 21, 2022
@alexander-yevsyukov alexander-yevsyukov deleted the filter-option-files-being-built branch January 21, 2022 16:57
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.

2 participants