Skip to content

Error in the new 0.17 version on bazel 5 #1024

Closed

Description

@tradergt

Every since 0.17.x has been released, none of version seem to work on bazel 5. I always get:

Cycle in the workspace file detected. This indicates that a repository is used prior to being defined.
The following chain of repository dependencies lead to the missing definition.
 - @bazel_skylib
This could either mean you have to add the '@bazel_skylib' repository with a statement like `http_archive` in your WORKSPACE file (note that transitive dependencies are not added automatically), or move an existing definition earlier in your WORKSPACE file.
ERROR: Error computing the main repository mapping: cycles detected during computation of main repo mapping

It would seem .17 has a new dependency. I already bring in gazelle so unless that is broken?

Activity

  1. aignas commented on Jan 27, 2023

    @aignas
    Collaborator
  2. tradergt commented on Jan 27, 2023

    @tradergt
    Author

    OK, so I am not 100% getting what that means. Is it saying that all py_tests that I have says:

    name = 'file_unittest' need to be changed to name = 'file_test'?

    Thanks!

  3. aignas commented on Jan 27, 2023

    @aignas
    Collaborator

    The error in your ticket shows that bazel_skylib, which became a dependency of rules_python in #1001 is missing from the registered dependency list.

    You probably need to update rules_python installation to be:

    
    http_archive(
        name = "rules_python",
        sha256 = "8c15896f6686beb5c631a4459a3aa8392daccaab805ea899c9d14215074b60ef",
        strip_prefix = "rules_python-0.17.3",
        url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.17.3.tar.gz",
    )
    
    load("@rules_python//python:repositories.bzl", "py_repositories")
    
    py_repositories()
    

    Which was documented in the release notes, but has not been called out as a breaking change in the text above the changelog.

  4. tradergt commented on Jan 27, 2023

    @tradergt
    Author

    Yes sir, that fixed it. I missed that in the notes. Thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions