-
Notifications
You must be signed in to change notification settings - Fork 547
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
updated PegasusPlugin to still register restModel tasks even if IDL files dir is empty #924
Conversation
@@ -1991,10 +1991,6 @@ protected void configureRestClientGeneration(Project project, SourceSet sourceSe | |||
{ | |||
// idl directory for api project | |||
File idlDir = project.file(getIdlPath(project, sourceSet)); | |||
if (SharedFileUtils.getSuffixedFiles(project, idlDir, IDL_FILE_SUFFIX).isEmpty()) | |||
{ | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will there be downsides for packing an empty jar?
why will you need a jar that is empty? Can your logic assume it empty when it doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no downsides or compatibility issues. just some negligible space will be used for PDL only projects to publish empty jars.
We will never use the empty jar. only the jars with IDL/ restmodels will be used by clients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated PR as per offline discussion @junchuanwang @mchen07
Discussed offline, so the empty jar published seems to be an unfortunate and inevitable side-effect if we use these changes to make these restModel tasks configured. Publishing empty jar should be backward compatible in restli sense. I give ship as we assessed this won't impact existing user. |
…iles dir is empty
Details: Allow creating rest model gradle tasks even if there are no IDL files are present at project evaluation time if
rest.idl.processEmptyIdlDir
is set to true for the project.###Testing Done
build