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

bazel 0.7.0 issues #58

Closed
mfarrugi opened this issue Nov 2, 2017 · 5 comments
Closed

bazel 0.7.0 issues #58

mfarrugi opened this issue Nov 2, 2017 · 5 comments

Comments

@mfarrugi
Copy link
Collaborator

mfarrugi commented Nov 2, 2017

I ran into

...
                rust_binary(name = 'hello')                    
        File "/home/marco/.cache/bazel/_bazel_marco/405dd47089fd4396034c2fe0895614dc/external/io_bazel_rules_rust/rust/rust.bzl", line 366, in _rust_binary_impl                                                                                               
                _setup_deps(ctx.attr.deps, ctx.label.name, outpu..., ...)                                                      
        File "/home/marco/.cache/bazel/_bazel_marco/405dd47089fd4396034c2fe0895614dc/external/io_bazel_rules_rust/rust/rust.bzl", line 142, in _setup_deps                                                                                                     
                set()                                          
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false.      

and assume other rules are similarly affected.

Is this being fixed already?

@katre
Copy link
Member

katre commented Nov 3, 2017

I don't believe so. The fix is pretty simple: just replace all set(...) calls with depset(...).

Is this something you would be interested in taking on? It's a simple fix, but I'm not sure if anyone else will have time in the near future.

@mfarrugi
Copy link
Collaborator Author

mfarrugi commented Nov 4, 2017

This was actually handled by #50, so this is an issue with the setup docs being unclear about supported bazel versions (ie. rules_rust-0.0.5 only works up to bazel-0.6.1).

@hwright
Copy link

hwright commented Nov 9, 2017

Perhaps it's worth cutting a new release and updating the docs?

@tomazos
Copy link

tomazos commented Jan 26, 2018

Hi, this doesn't work with latest bazel 0.9 for same reason as OP (The set constructor for depsets is deprecated and will be removed. Please use the depset constructor instead. You can temporarily enable the deprecated set constructor by passing the flag --incompatible_disallow_set_constructor=false.). Can you cut a new release with the fix? or post instructions on how to take master in the WORKSPACE?

@mfarrugi
Copy link
Collaborator Author

@tomazos To grab the latest you can do this:

http_archive(
    name = "io_bazel_rules_rust",
    # sha256 = # Will be a moving target for master
    strip_prefix = "rules_rust-master",
    urls = [
        "https://github.com/bazelbuild/rules_rust/archive/master.tar.gz",
    ],
)
load("@io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")

rust_repositories()

But you should refer to a particular commit and provide the sha256

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

No branches or pull requests

4 participants