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

Remove duplicate output source dir. #703

Merged
merged 3 commits into from
May 10, 2023
Merged

Conversation

csv8674xn
Copy link
Contributor

@csv8674xn csv8674xn commented May 10, 2023

Remove duplicate output source dir that breaks in android in source jar task.

When using the insertion point, custom plugin needs to use the same output directory as the code gen output directory from java/javalite. This causes other tasks to fail if it depends on the output source and duplicationStrategy is set to DuplicatesStrategy.FAIL

Remove duplicate output source dir that breaks in android is custom plugin is applied and output codegen.
@google-cla
Copy link

google-cla bot commented May 10, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ejona86
Copy link
Collaborator

ejona86 commented May 10, 2023

Multiple plugins having the same output directory sounds like asking for trouble. Why are they being configured to have the same output directory?

@karthikrg
Copy link
Contributor

Multiple plugins having the same output directory sounds like asking for trouble. Why are they being configured to have the same output directory?

@ejona86 Without using the same output directory we are not able to use insertion points to modify the code generated by the java/javalite plugin.

@ejona86
Copy link
Collaborator

ejona86 commented May 10, 2023

Oh, gosh, insertion points. Okay, yeah, that is at least worth a comment in the code as a reminder.

I'll note that it is generally a bad idea to use insertion points, but that is just useless advice if you are already using them as they are almost impossible to migrate away from.

add comment for the rationale behind avoiding duplication with insertion point output source
@csv8674xn csv8674xn marked this pull request as ready for review May 10, 2023 02:58
Copy link
Collaborator

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

Note that codenarc is failing. You'll want to run that locally to address the style issue.

@ejona86 ejona86 requested review from YifeiZhuang and rougsig May 10, 2023 15:01
fix styling
@csv8674xn
Copy link
Contributor Author

csv8674xn commented May 10, 2023

@ejona86 Two required tests failed to run and I don't see the project is configured to enable manual rerun(at least I can't find it)
Those two failed with 0s and were passing before my styling fixes. Seem like a CI issue.

@ejona86
Copy link
Collaborator

ejona86 commented May 10, 2023

Looks like github is a bit unhealthy today. https://www.githubstatus.com/ . Restarting them worked (and yes, you don't have permission to do that).

@ejona86 ejona86 merged commit 96e23fa into google:master May 10, 2023
@csv8674xn
Copy link
Contributor Author

Thanks for merging the PR @ejona86. Do we have a regular release schedule to follow? Based on the past release timeline, it does not look like it was periodic.

@csv8674xn
Copy link
Contributor Author

Thanks for merging the PR @ejona86. Do we have a regular release schedule to follow? Based on the past release timeline, it does not look like it was periodic.

@rougsig if you can share some information, that would be great. Thank you.

@rougsig
Copy link
Collaborator

rougsig commented May 18, 2023

There is no release cycle. The release published after adding functionality or fixing bugs.

@csv8674xn
Copy link
Contributor Author

There is no release cycle. The release published after adding functionality or fixing bugs.

Do we anticipate releasing a version with this fix soon-ish? This is actually blocking the usage of AGP 8.0 if we use insertion point at the same time. Currently, there's no workaround of this issue until this change is released. @rougsig

@rougsig
Copy link
Collaborator

rougsig commented Jul 11, 2023

@YifeiZhuang Can we do a release?

YifeiZhuang pushed a commit to YifeiZhuang/protobuf-gradle-plugin that referenced this pull request Jul 13, 2023
Remove duplicate output source dir that breaks in android in source jar
task.

When using the insertion point, custom plugin needs to use the same
output directory as the code gen output directory from java/javalite.
This causes other tasks to fail if it depends on the output source and
duplicationStrategy is set to `DuplicatesStrategy.FAIL`
YifeiZhuang added a commit that referenced this pull request Jul 13, 2023
Remove duplicate output source dir that breaks in android in source jar
task.

When using the insertion point, custom plugin needs to use the same
output directory as the code gen output directory from java/javalite.
This causes other tasks to fail if it depends on the output source and
duplicationStrategy is set to `DuplicatesStrategy.FAIL`

Co-authored-by: Yao-Jung Yang <[email protected]>
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.

4 participants