bazel icon indicating copy to clipboard operation
bazel copied to clipboard

packages.bzl has machine-specific paths

Open kevmoo opened this issue 9 years ago • 4 comments

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.

kevmoo avatar Feb 20 '17 23:02 kevmoo

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.

natebosch avatar Feb 21 '17 00:02 natebosch

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.

kevmoo avatar Feb 21 '17 00:02 kevmoo

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.

jakemac53 avatar Feb 21 '17 15:02 jakemac53

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.

jakemac53 avatar Feb 21 '17 15:02 jakemac53