Repository navigation
Use Skylib's skylark_library for rules. - #214
Conversation
|
Travis is unhappy: The command "buildifier -mode=check $(find . -name WORKSPACE -type f)" exited with 4. |
mattmoor
left a comment
There was a problem hiding this comment.
Thanks, I think my only concern is potential impact to dependents.
| d_repositories() | ||
|
|
||
| # For skylib_library. | ||
| git_repository( |
There was a problem hiding this comment.
I think dependents will need these dependencies, so can you add them to the repositories() function in container/container.bzl?
There was a problem hiding this comment.
I can do bazel_skylib, but apparently trying to do that with io_bazel ends up with a chicken-and-egg problem:
ERROR: Failed to load Skylark extension '@io_bazel//tools/build_defs/hash:hash.bzl'.
It usually happens when the repository is not defined prior to being used.
Maybe repository 'io_bazel' was defined later in your WORKSPACE file?
Since WORKSPACE loads container.bzl and that loads container/image.bzl and that refers to io_bazel, I'm not sure how to extract that nicely into repositories only and structural defines separately. Would you want a container_repos.bzl that was specific to WORKSPACE includes? This model kinda sucks. I would think it'd want to at least warn you that you were asking for a different (esp. if later) tag or commit instead of the "I just hope somebody includes it" model.
There was a problem hiding this comment.
Alright, I have some kludges that do this in Capstan@ec938fa It makes there be a separation between Skylark to establish repos and Skylark for rules. This allows the latter to refer to other repositories but ensures that all of those repository names have been defined first. A top-level WORKSPACE must load and invoke the repos macro before trying to load other Skylark in that project.
I'm not sure I like it better, but it works (well, it gets further along in e2e). Also, /bin/true doesn't exist by default on an Xcode-laden Mac (it's /usr/bin/true), and I'm not sure yet what else doesn't work when locally running e2e test on a Mac.
|
|
de26cdd to
b234d62
Compare
|
@Capstan IIUC, if we wait until a sufficiently modern Bazel is released, and start to require that version, we could avoid the breaking change? If so, can we determine when said change would land in a Bazel release? /cc @damienmg I think my preference would be to force users upgrading If we're talking about O(weeks), then I think I'd rather we wait on merging the PR (and perhaps merge the change directly into the mono-repo to unblock you). Hopefully that all makes sense? WDYT? |
|
It will be in 0.8 which is currently in RC so should be released in roughly
10 days.
…On Wed, Nov 8, 2017, 9:07 PM Matt Moore ***@***.***> wrote:
@Capstan <https://github.com/capstan> IIUC, if we wait until a
sufficiently modern Bazel is released, and start to require that version,
we could avoid the breaking change?
If so, can we determine when said change would land in a Bazel release?
/cc @damienmg <https://github.com/damienmg>
I think my preference would be to force users upgrading rules_docker with
older Bazel versions to upgrade Bazel too vs. breaking everyone that
upgrades. :(
If we're talking about O(weeks), then I think I'd rather we wait on
merging the PR (and perhaps merge the change directly into the mono-repo to
unblock you).
Hopefully that all makes sense? WDYT?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#214 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADjHf0Baa1gi0-pNMOvfgwMYVqNrEmStks5s0oiEgaJpZM4QRL_X>
.
|
|
@mattmoor Yes, a modern Bazel would also work here. It doesn't ultimately solve the problem that upstream Bazel source changes will not be applied to rules_docker identically: two developers with different Bazel versions with different @damienmg Ooh, that's good to hear. I thought my commit was going to be after the cutoff for 0.8. Too bad we don't have labels to show "commit first released in release" I can wait 10 days. though this is starting to block forward progress on my end. |
f18e4fc to
92b866c
Compare
|
I manually installed 0.8-rc2 and moved build references back to build_tools and it worked. Additionally, I made travis point at bazel testing branch so that it should at least validate that e2e tests will run with the release is live. |
|
I believe you already have this change against the mono-repo, can we merge that and hold off on this for ~10 days? I think that should unblock you? |
|
@mattmoor SGTM. |
|
Doh, inadvertently closed it. |
|
Can one of the admins verify this patch? |
a902698 to
45f021d
Compare
|
Now that 0.8 has been released, I've backed out the |
|
@mattmoor I think you launched this before Chocolatey was updated (bazelbuild/bazel#4196 (comment)), and so got 0.8.0 anyway. |
|
Bazel CI is green. I'm going to close / reopen to retrigger everything now. |
|
Can one of the admins verify this patch? |
|
Test this please |
|
@Capstan Looks like all that's left is buildifier :) |
|
Test this please |
|
I tried to "Resolve conflicts" through the web editor, but that seems to have done nothing but retrigger CI... I fixed the I am going to work through the various other PRs that have accumulated (I'm assuming you aren't still online), but ping me on hangouts if you want to take a lock to avoid going back and forth with merge conflicts :) |
This only addresses docker directory and its dependencies: the container and skylib directories.
ee21f46 to
2173e7d
Compare
|
Test this please |
|
@Capstan thanks for your patience and persistence :) |
This only addresses docker directory and its dependencies: the container and skylib directories.