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

Fix codegen target paths #254

Merged
merged 1 commit into from
Jul 16, 2021
Merged

Fix codegen target paths #254

merged 1 commit into from
Jul 16, 2021

Conversation

dziemba
Copy link
Contributor

@dziemba dziemba commented Jul 16, 2021

Before this change we would write the ScalaPB-generated code directly to
sourceManaged. This works fine until another library/app writes to
that directory. It seems like ScalaPB deletes all contents in its
specified target directory, therefore removing any other code that might
also live there.

To fix this, we now write the generated code in twinagle-specific
subdirectories. By doing that, ScalaPB only cleans our own directories,
leaving other subdirs in the main sourceManaged directory alone.

This change is fully backwards-compatible, no code-changes are needed.
You might have to run sbt clean once in the target project though
to prevent duplicate files.

Before this change we would write the ScalaPB-generated code directly to
`sourceManaged`. This works fine until another library/app writes to
that directory. It seems like ScalaPB deletes all contents in its
specified target directory, therefore removing any other code that might
also live there.

To fix this, we now write the generated code in twinagle-specific
subdirectories. By doing that, ScalaPB only cleans our own directories,
leaving other subdirs in the main `sourceManaged` directory alone.

This change is fully backwards-compatible, no code-changes are needed.
You might have to run `sbt clean` once in the target project though
to prevent duplicate files.
Copy link

@g1ngerbeard g1ngerbeard left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@dziemba dziemba merged commit f592432 into master Jul 16, 2021
@dziemba dziemba deleted the fix-target-paths branch July 16, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants