Plumb bytes to zincutils rebase interface

Review Request #2776 — Created Sept. 5, 2015 and submitted

patricklaw
pants
2140
cbce89f...
pants-reviews
benjyw, jsirois, stuhood, zundel

zincutils optimizes analysis parsing in a way that requires bytes-only
string replacement operations. Zinc analysis with non-ascii symbols
will fail in some circumstances when the placeholder directory strings
passed into the parser object are not strictly bytes. This change
ensures that bytes-only directory structures are passed to the rebase
method by utf-8 encoding the buildroot and setting the
AnalysisTools._PANTS_HOME_PLACEHOLDER constant to be a bytes type
rather than a "text" string.

Add a test for this particular failure and flip on name_hashing
in pants.isolated.ini. Confirmed the test fails (with a hack to
check stdout for "FAILURE", because currently we don't actually
fail on cache write failures, for good reason). The test passes
after the fix.

CI green: https://travis-ci.org/pantsbuild/pants/builds/78854681

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
PA
PA
ST
  1. 
      
  2. pants.ini.isolated (Diff revision 1)
     
     
     
     
     
     
     
     

    For the purposes of tests, it would be good to add the relevant cache flags explicitly.

    In particular, they should not write to a persistent directory.

  3. 
      
PA
ZU
  1. 
      
  2. Note that this is already set by pants.ini.isolated.

    I'm kind of surprised you chose to express this on the command line but leave the more obscure --compile-zinc-name-hashing, which is apparently essential to this test, to be set in pants.ini.isolated.

    1. Agreed, I was pretty tired as I put the final touches on this, and it was mostly copied from a test above. There's no point in the jmake setting since there are no java targets in this test, and the name hashing setting should be explicit. However I do want to leave name hashing on in pants.isolated.ini since we want to start encouraging people to use it, if only to shake out any remaining bugs.

  3. 
      
ZU
  1. Ship It!
  2. 
      
PA
ZU
  1. Ship It!
  2. 
      
ST
  1. Ship It!
  2. 
      
PA
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks, submitted @ 49cd4d7711aa8a894d9c031d45bf40aece7d755a

NH
  1. Ship It!
  2. 
      
Loading...