Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

ERROR: Failed to load Skylark extension '@bazel_skylib//:lib.bzl'. #233

Closed
oferb opened this issue Jul 23, 2018 · 5 comments
Closed

ERROR: Failed to load Skylark extension '@bazel_skylib//:lib.bzl'. #233

oferb opened this issue Jul 23, 2018 · 5 comments

Comments

@oferb
Copy link

oferb commented Jul 23, 2018

I'm getting the following error:

ERROR: Failed to load Skylark extension '@bazel_skylib//:lib.bzl'.
It usually happens when the repository is not defined prior to being used.
Maybe repository 'bazel_skylib' was defined later in your WORKSPACE file?
ERROR: cycles detected during target parsing

It disappears when I remove the following from WORKSPACE:
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
That's why I'm opening this issue here.

Another odd thing, is that it worked, until I did bazel clean --expunge and then it started giving the error.

Steps to reproduce (done on Linux):

  1. git clone https://github.com/google/startup-os
  2. bazel build //common:all (though any build seems to give the error)

Thanks!

@alexeagle
Copy link
Contributor

Duplicate of #202

We should have noted the breaking change. I think this was introduced when we added a dependency on rules_webtesting. bazelbuild/rules_webtesting@7a29649
Their README also fails to indicate that users need this dependency.

oferb pushed a commit to google/startup-os that referenced this issue Jul 24, 2018
@oferb
Copy link
Author

oferb commented Jul 24, 2018

Thanks!
This commit fixes the issue: google/startup-os@f911766

One thing I've noticed through this though, is that depending on master makes bazel builds non-reproducible, as in this example where it was working until I did bazel clean --expunge which made it stop working (probably due to getting the latest master).

@alexeagle
Copy link
Contributor

alexeagle commented Jul 24, 2018 via email

@kellycampbell
Copy link
Contributor

We have one developer running into this problem, but we don't know why yet. We're are pinned to a specific commit in our WORKSPACE:

git_repository(
    name = "build_bazel_rules_typescript",
    remote = "https://github.com/bazelbuild/rules_typescript.git",
    commit = "3f3bf6df35c890733350bbc27d98a7174340c3d0", # rel: 0.15.1
)

@kellycampbell
Copy link
Contributor

We think we figured it out. Our rules_webtesting dependency points to their master because that's what their README has as the examples.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants