packages.bzl has machine-specific paths
Call this a place-holder for discussing our download/caching strategy.
Obviously, we can replace using the local pub cache with new_http_repository – but then we get double downloading.
Why is this a problem? We don't support (yet) checking in package.bzl for sharing.
We could make an optional mode to use remote repositories outside the existing pub cache for the purposes of debugging etc - but we probably don't want it being a matter of course until things are stable.
Perhaps, at a minimum, we should chat about if packages.bzl should be in .gitignore. Seems like it shouldn't be committed.
If it should be ignored, then we're in the interesting position of saying everything that pub run dazel init does should be ignored.
...which is interesting.
Perhaps dazel server and dazel build should just auto-run dazel init. We can let folks know if anything is created or changed, etc.
Perhaps dazel server and dazel build should just auto-run dazel init. We can let folks know if anything is created or changed, etc.
We have discussed running dazel init automatically before, and it definitely has advantages. However I think it would also have the disadvantage of destroying your caching? We could make it not actually bash over files that are identical to what it would write though, which should fix that. Or maybe bazel is smart enough to actually check the hash of the BUILD/bzl files and not invalidate things.
Perhaps, at a minimum, we should chat about if packages.bzl should be in .gitignore. Seems like it shouldn't be committed.
Yes we should add this to the suggestions for the .gitignore file it seems like if it isn't already in there.