Remove `WORKSPACE` writing functionality.
We perform a write of canonical arguments to WORKSPACE
when performing a download.
This is a terrible practice. The metadata
attribute added in !10 (merged) is a much better way to control this.
Remove the //lib:workspace.bzl
.
Any return write(rctx, canonical)
can be switched to return canonical
.
We could have a graceful way to resolve this using environment variables:
- Do not do any
WORKSPACE
writing ifBAZEL_DOWNLOAD_UTILS_WRITE_WORKSPACE=0
- Possibly, print a single
print
warning about the deprecation - Do a release and make it explicit that the functionality is deprecated and will eventually be removed
- Wait a few months
- Flip the functionality so that we only write the
WORKSPACE
file whenBAZEL_DOWNLOAD_UTILS_WRITE_WORKSPACE=1
- Wait a few months
- Remove the functionality
Edited by Matthew Clarkson