bazelbuild / bazelbuild/rules_rust

rustc_compile_action: deps required to be a list instead of a depset in 0.67.0

Open
#3,751 4 comments 0 reactions 1 assignee Claimed by @krasimirgg View on GitHub
core
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

While migrating my project from 0.63 to 0.67 I found something strange a bit, so, wanted to double check. Here's my PR: https://github.com/mvukov/rules_ros2/pull/541/files. In short, I do code-generation in an aspect where I also compile rust code. That means that deps for the compile actions are pooled via the dep graph. A natural way to handle deps is via a depset which was the case until recently. So, instead of doing something like:
```
deps = depset(direct=direct_deps, transitive=transitive_deps)
```
I have to do now:
```
deps = direct_deps + transitive_deps.to_list()
```
Issues I see:
* calling to_list(), which can be a performance hit,
* it doesn't make a lot of sense as deps are converted to a depset internally https://github.com/bazelbuild/rules_rust/blob/0.67.0/rust/private/rustc.bzl#L1211.

I guess there was some reasoning behind this change, would be great if someone can share the rationale.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.