Bugfix: when synthesizing remote libraries in Go, pin them to the same rev as adjacent libs.

Review Request #4325 — Created Oct. 18, 2016 and submitted

nicks
pants
pants-reviews
benjyw, jsirois
Also, fingerprint downloaded repos by rev.

Fixes a variety of weird go/pants caching issues.


  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
  1. I could use some advice on how to write tests for this. I tested it manually by flipping between golang branches and running my own go tests.

    Most of the Pants tests seem focused on making sure that the build runs correctly, whereas this is more about making sure we're properly dealing with build artifacts from previous runs.

  2. 
      
  1. Thanks for the fix. This looks fine to me, but please wait for John to chime in, as it's been a while since I've done any Go work, so this stuff is not in my brain cache any more...

  2. Nit: Trailing whitespace.

  3. Nit: trailing whitespace.

  4. 
      
  1. 
      
  2. Should probably explain here what rev=None means.

  3. 
      
  1. 
      
  2. I find the name same_package_libs a bit confusing, but this may just be because I can't remember the terminology properly. Isn't there a 1:1 correspondence between go package and Pants library?

  3. I find the name same_package_libs a bit confusing, but this may just be because I can't remember the terminology properly. Isn't there a 1:1 correspondence between go package and Pants library?

    1. Benjy is right, I think the more correct name is same_remote_libs; ie: list contains [https://github.com/project/pkg_a, https://github.com/project/pkg_b] because spec_path == '3rdparty/go/github.com/project'.

  4. 
      
  1. Looks good to me.  I'll patch this in once all of Benjy's comments have been addressed.
    
    Thanks for pitching in and squashing these bugs Nick!
  2. 
      
  1. Ship It!
  2. 
      
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit e64eab9d73eef47ac1aedaa2952b4004e587b543
Author: Nicholas Santos <nick@medium.com>
Date:   Mon Oct 24 11:51:56 2016 -0400

    Bugfix: when synthesizing remote libraries in Go, pin them to the same rev as adjacent libs.
    
    Also, fingerprint downloaded repos by rev.
    
    Fixes a variety of weird go/pants caching issues.
    
    Reviewed at https://rbcommons.com/s/twitter/r/4325/
  1. Thanks again Nick - in @ https://github.com/pantsbuild/pants/commit/e64eab9d73eef47ac1aedaa2952b4004e587b543
    This will go out with the 1.3.0dev1 release this Friday.
  2. 
      
  1. Ship It!
  2. 
      
Loading...