Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_repositories() fails if user's workspace already contains "subpar" #77

Closed
ghost opened this issue Jun 29, 2017 · 2 comments
Closed

Comments

@ghost
Copy link

ghost commented Jun 29, 2017

We use subpar for packaging Python. When trying to introduce Docker support using WORKSPACE file (following the example in README.md), I get the following:

	File "/home/dmitryb/.cache/bazel/_bazel_dmitryb/8e618220280fa417619d9462a0a41d8d/external/io_bazel_rules_docker/docker/docker.bzl", line 128, in docker_repositories
		native.git_repository(name = "subpar", remote = "https:/...", ...")
Cannot redefine repository after any load statement in the WORKSPACE file (for repository 'subpar').
ERROR: Error evaluating WORKSPACE file.
ERROR: error loading package 'external': Package 'external' contains errors.

Seems like you're loading subpar as a part of docker_repositories(), and it's conflicting with the existing subpar target we already have.

Maybe namespacing it in some way (e.g. rules_docker_subpar) could prevent this?

@promiseofcake
Copy link

Related: #55

@mattmoor
Copy link
Contributor

Yeah I think #55 is what we want, I just haven't had a moment to do it amidst some improvements I've been working on. If the workaround in #55 doesn't work for you, then I'll try to TAL at it sooner than later.

mattmoor added a commit to mattmoor/rules_docker that referenced this issue Jun 30, 2017
mattmoor added a commit to mattmoor/rules_docker that referenced this issue Jun 30, 2017
mattmoor added a commit to mattmoor/rules_docker that referenced this issue Jul 3, 2017
This avoids manual `excludes=[]` and `overrides={}`, which were suggested in the linked issues.  We exclude things that have already been imported, so to override them, simply import them before `docker_repositories()` and the exclusion logic will handle the rest.

Fixes: bazelbuild#55
Fixes: bazelbuild#77
mattmoor added a commit to mattmoor/rules_docker that referenced this issue Jul 6, 2017
This avoids manual `excludes=[]` and `overrides={}`, which were suggested in the linked issues.  We exclude things that have already been imported, so to override them, simply import them before `docker_repositories()` and the exclusion logic will handle the rest.

Fixes: bazelbuild#55
Fixes: bazelbuild#77
mattmoor added a commit that referenced this issue Jul 10, 2017
This avoids manual `excludes=[]` and `overrides={}`, which were suggested in the linked issues.  We exclude things that have already been imported, so to override them, simply import them before `docker_repositories()` and the exclusion logic will handle the rest.

Fixes: #55
Fixes: #77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants