resonai / ybt

Yet another Build Tool
Apache License 2.0
2 stars 2 forks source link

Allow the user to add a salt to the hash so he can invalidate the cac… #225

Closed eyal-resonai closed 2 years ago

eyal-resonai commented 2 years ago

…he when needed

eyal-resonai commented 2 years ago

code looks good, but can you explain the use-case and motivation to do this?

hi :)

The previous PR allowed the user of ybt to control the root directory of the proto builder generated code output (in order to overcome the problem of 3rd part module named proto: https://github.com/googleapis/proto-plus-python/issues/79).

Now that we can change that in our project's YSetting we are facing the problem that the cache hash has not changed but we need to invalidate all the proto targets cache.

We thought about adding salt for each builder and control it from there. While it is a good idea to have and we do want to have it, having a user control salt is a must so that the user can easily invalidate cache when she changes things in YSettings that needs cache invalidation.