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

#1625 fix transformer not picked up #1626

Merged
merged 2 commits into from
Dec 17, 2021
Merged

Conversation

borissmidt
Copy link
Contributor

fixes related issue #1625
It was easy to resolve the missing package context file by passing all files that need to be generated to protoc at once.
This is similar how sbt and gradle use protoc to compile the sources.

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.

Thanks for your contribution! Please avoid reformatting unchanged lines, but if, please use Scalafmt with our config.

contrib/scalapblib/src/ScalaPBWorker.scala Outdated Show resolved Hide resolved
@borissmidt borissmidt force-pushed the fix/1625 branch 2 times, most recently from f51cb33 to fe7ee6a Compare December 16, 2021 09:22
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.

Thanks. Looks good now! 👍

@borissmidt
Copy link
Contributor Author

I might come back with another PR because i have projects with multiple modules that depend on each and they all do scalaPB.
So i'm not sure if this will handle 'transititive' scalapb options.

@lefou lefou merged commit 78acf98 into com-lihaoyi:main Dec 17, 2021
@lefou lefou linked an issue Dec 17, 2021 that may be closed by this pull request
@lefou lefou added this to the 0.10.0-M5 milestone Dec 17, 2021
@borissmidt
Copy link
Contributor Author

Ah damn i just found 1 bug i have to add

          compiler.compileScalaPB(inputDir.toIO, files, scalaPBOptions, dest.toIO, scalaPBCExtraArgs)
        }
        ```
        otherwise we get an error if there is no file

@lefou
Copy link
Member

lefou commented Dec 17, 2021

@borissmidt Best is to add a test case to reproduce the bug and open a new PR with the test and it's fix.

@borissmidt
Copy link
Contributor Author

Yes indeed i just couldn't fix my initial problem that scalapb.options on package scope level of other projects and probably jars are not picked up.
So i think this is a bigger problem within scalapb.

pbuszka pushed a commit to pbuszka/mill that referenced this pull request Dec 26, 2021
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.

ScalaPBModule does not pick transformers
2 participants