Fix `jvm_app` fingerprinting for bundles with non-existing files.

Review Request #3654 — Created April 6, 2016 and submitted

tabishev
pants
tabishev/do_not_fail_on_non_existent_files
3154
pants-reviews
benjyw, patricklaw, stuhood, zundel

In our repository we have jvm_app targets which contain bundles with non-existing files. Use case for this bundles suggests to have this files prepared some other way before you'll bundle this jvm_apps.

This RB add test on this use case and fixes fingerprint for this bundles.

https://travis-ci.org/ttim/pants/builds/121546367

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
  1. 
      
  2. tests/python/pants_test/backend/jvm/targets/test_jvm_app.py (Diff revision 1)
     
     
     
     
     
     
     
     
     

    Could you move the fingerprint generation together, and asserts together?

    f... = calc_fingerprint()
    self.create_file...
    f... = calc_f...
    ...
    
    self.assert...
    

    Also, how about naming the fingerprints by case rather than number, ie no_file_fingerprint instead of fingerprint1.

    1. Looks nicer, thanks!

  3. 
      
  1. 
      
  2. src/python/pants/backend/jvm/targets/jvm_app.py (Diff revision 1)
     
     
     
     
     
     
     
     

    Seems this will cause a file with content 'e' resulting the same figner print as the empty file.

    1. File with content 'e' will produce hasher.update('ee'), while for empty file hasher.update('e') will be executed.

  3. 
      
  1. Ship It!
  2. 
      
  1. Ship It!
  2. 
      
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 4b2c79619c89c86e1f04a43d58b34c186b0b9927, thanks Nick and Yi!

Loading...