bazelbuild / bazelbuild/rules_rust

Differences of resolving Sync trait requirements

Open
#1,590 0 comments 0 reactions 0 assignees View on GitHub
needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

I tried compiling module against [this crate](https://github.com/picodata/tarantool-module) and while it compiles just fine without Bazel,
seems like rules_rust handle something differently which results into compiler complains. The rules_rust version is latest 0.10.0

```
error[E0277]: `Rc` cannot be sent between threads safely
--> external/no_cargo__tarantool-0.6.3/src/net_box/schema.rs:162:1
|
162 | / lazy_static! {
163 | | static ref SCHEMA_CACHE: ConnSchemaCache = ConnSchemaCache {
164 | | cache: RefCell::new(HashMap::new()),
165 | | };
166 | | }
| |_^ `Rc` cannot be sent between threads safely
```

The repository is defined manually like this

```
crates_repository(
name = "no_cargo",
lockfile = "//third_party:Cargo.Bazel.lock",
cargo_lockfile = "//:Cargo.lock",
packages = {
...
"tarantool": crate.spec(
features = ["schema"],
version = "0.6",
),
...
},
splicing_config = splicing_config(
resolver_version = "2",
),
render_config = render_config(
default_package_name = ""
),
)
```

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.