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

scalapblib- support specifying individual source files #2126

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

oridag
Copy link
Contributor

@oridag oridag commented Nov 16, 2022

Currently the ScalalPB plugins only allows specifying whole directories as source. This change allows specifying individual files as inputs.
In addition, ScalaPBC is now invoked once for all input paths instead of separate invocation for each input path. This is important because it allows setting package scoped options to take affect across all input paths.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. I added one remark inline.

@@ -108,7 +106,7 @@ class ScalaPBWorker extends AutoCloseable {

trait ScalaPBWorkerApi {
def compileScalaPB(
root: File,
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to keep an overloaded (maybe deprecated) method with the old signature (it can simply forward to the new implementation though), to keep binary compatibility and avoid breaking someones workflow. You never know, who is already using or integrating this module.

@oridag oridag force-pushed the scalapblib-individual-sources branch from 4ef1dba to 2dcd5d7 Compare November 17, 2022 06:36
@oridag oridag requested a review from lefou November 17, 2022 06:52
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you!

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