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 generated code when checking out a new branch #2535

Closed
wants to merge 4 commits into from

Conversation

blvrd
Copy link
Contributor

@blvrd blvrd commented Aug 14, 2019

Description

Generated code and mocks hang around when we change branches and can cause potential confusion when things don't work properly.

Reviewer notes

make clean might be too blunt of an instrument, since it forces us to re-build our binaries. Do we have a more lightweight command we should run instead, or just remove the pkg/gen folder along with mocks?

Setup

  • scripts/install-post-checkout-hook
  • try checking out another branch

Code Review Verification Steps

  • Request review from a member of a different team.
  • Have the Pivotal acceptance criteria been met for this change?

References

Copy link
Contributor

@chrisgilmerproj chrisgilmerproj left a comment

Choose a reason for hiding this comment

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

I think this is a great start. I might also suggest having something in the Makefile that enforces that this hook is installed.

Garrett Martin and others added 2 commits August 15, 2019 15:56
Co-Authored-By: Chris Gilmer <chris@truss.works>
@codecov
Copy link

codecov bot commented Aug 15, 2019

Codecov Report

Merging #2535 into master will decrease coverage by 0.2%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master   #2535     +/-   ##
========================================
- Coverage    60.1%   59.9%   -0.1%     
========================================
  Files         284     283      -1     
  Lines       15890   15844     -46     
========================================
- Hits         9535    9489     -46     
  Misses       5235    5235             
  Partials     1120    1120
Impacted Files Coverage Δ
pkg/db/dbfmt/dbfmt.go

@blvrd
Copy link
Contributor Author

blvrd commented Aug 15, 2019

@chrisgilmerproj updated based on your feedback. How should I communicate this kind of change? In #dp3-engineering?

@blvrd
Copy link
Contributor Author

blvrd commented Aug 15, 2019

Closing since the # in the branch name is causing the build to break. Will open another PR.

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.

None yet

2 participants