Closed gameraccoon closed 1 year ago
What does cargo tree
give?
I ran into this also, and figured out the problem is that the extra-traits
feature needs to be enabled on the syn
dependency in druid-derive
. I was about to open a PR to address this, but then I noticed that this project has been discontinued by its maintainers. So I decided not to open the PR.
syn 冲突
执行 cargo tree -d
syn v1.0.109
├── displaydoc v0.2.3 (proc-macro)
│ └── tinystr v0.7.1
│ └── unic-langid-impl v0.9.1
│ └── unic-langid v0.9.1
│ ├── druid v0.8.3
│ │ └── demo2 v0.1.0 (D:\Desktop\tcode\demo2)
│ ├── fluent-bundle v0.15.2
│ │ └── druid v0.8.3 (*)
│ ├── fluent-langneg v0.13.0
│ │ ├── druid v0.8.3 (*)
│ │ └── fluent-bundle v0.15.2 (*)
│ ├── intl-memoizer v0.5.1
│ │ └── fluent-bundle v0.15.2 (*)
│ └── intl_pluralrules v7.0.2
│ └── fluent-bundle v0.15.2 (*)
└── druid-derive v0.5.0 (proc-macro)
└── druid v0.8.3 (*)
syn v2.0.15
├── thiserror-impl v1.0.40 (proc-macro)
│ └── thiserror v1.0.40
│ └── fluent-syntax v0.11.0
│ ├── druid v0.8.3 (*)
│ └── fluent-bundle v0.15.2 (*)
└── tracing-attributes v0.1.24 (proc-macro)
└── tracing v0.1.38
├── druid v0.8.3 (*)
└── druid-shell v0.8.3
└── druid v0.8.3 (*)
可以通过 使用patch
暂时解决, Carto.toml
[dependencies]
druid = "0.8.3"
[patch.crates-io]
tracing = { git = "https://github.com/tokio-rs/tracing.git", package= "tracing", tag="tracing-0.1.37"}
thiserror = { git = "https://github.com/dtolnay/thiserror.git", tag="1.0.39"}
I think this is the same as #2374, so closing as fixed. Please re-open if you still see the problem.
It is the same indeed. Looks like the tracing
crate enables the extra-traits
feature on syn
which is why our tests didn't catch this. Seems like a shortcoming of our testing methodology that it always builds with dev dependencies. Something to look into.
The bugfix is now published as druid-derive
v0.5.1 so the original repro is solved. :tada:
I tried to add the
druid
crate to an empty binary (application) but it failed to build for me.OS: Pop!_OS 22.04 LTS Rustc: 1.69.0
Repro steps:
Expected behavior: the default application builds and prints "Hello, world!"
Observed behavior: build fails with these errors:
Also tried: Update rust:
rustup update
Clean rust caches:
None of this helped.
What helps is to change
druid
version to "0.7.0", but I'm really interested to use 0.8.* features.