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

updated PegasusPlugin to still register restModel tasks even if IDL files dir is empty #924

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

aman1309
Copy link
Contributor

@aman1309 aman1309 commented Jul 19, 2023

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

@@ -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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

@junchuanwang
Copy link
Contributor

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.

@aman1309 aman1309 merged commit 8a0e98f into master Jul 21, 2023
1 check passed
@aman1309 aman1309 deleted the idl branch July 21, 2023 22:45
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