Hashes keep changing for Python dependencies via pip_library

38 views
Skip to first unread message

Rob Williams

unread,
Jul 1, 2021, 2:19:35 PM7/1/21
to please-build
I am new to Please, but I love it.

I have followed the Getting Started tutorial for Python.  Now I am enhancing it for advanced features.  I am doing all this on Apple macOS 11.4 and Python 3.9.5 within a Bash shell.

I executed `plz test` and the tutorial runs fine.
I added `hashes = [...],` to the `pip_library` target for `numpy`.
I executed `plz hash //...:numpy` to get the hash.
I added it to `hashes` in the `pip_library` call.
I executed `plz test` and the tutorial runs fine.
I executed `plz clean`.
I executed `plz test` and the tutorial runs fine.
I executed `plz clean`.
I executed `plz test` again, but it fails because the hash does not match!!!
I executed `plz hash --update //...:numpy`, and it updated the hash in the build file.
I executed `plz test` again, but it fails because the hash does not match!!!

So it appears that using `pip_library` to download `numpy` after a `plz clean` results in a new hash that does not match the previous one.  That seems to be very undesirable behavior.

I am very familiar with Python and with build tools, so I can readily guess what might be forcing the hash to change.  But I would think that was handled, since hashes would be useless if this is typical behavior.  I cannot imagine what I might be doing to drive it, so I have assumed that others are experiencing this issue.  I hunted all over the Please website and I searched the web, but I have found no insights yet into this.

I am trying to imagine what I should try next.  For now, I am simply commenting out the `hashes` and working with just `version`.

What am I missing, Please?

See what I did there?  :)

Thanks for such a great tool!!!

Rob

Rob Williams

unread,
Jul 4, 2021, 2:41:33 PM7/4/21
to please-build
Oh, sorry, never mind.  Further research reveals that Please does not suit my needs after all.  I am moving on to Earthly, since I prefer their approach much more.

Thanks anyway!
Reply all
Reply to author
Forward
0 new messages