From 7084a380a675c0ce852916278a270015159ae570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Tue, 14 Nov 2023 11:31:34 +0100 Subject: [PATCH] Disallow multiple esp-hal-common versions (#934) --- CHANGELOG.md | 1 + esp-hal-common/Cargo.toml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b6452ab..72dde66db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - C2, C3: atomic emulation trap is now opt-in (#904) - Improve DMA documentation & clean up module (#915) +- Only allow a single version of `esp-hal-common` to be present in an application (#934) ### Fixed diff --git a/esp-hal-common/Cargo.toml b/esp-hal-common/Cargo.toml index 71ef1b8a4..15a952308 100644 --- a/esp-hal-common/Cargo.toml +++ b/esp-hal-common/Cargo.toml @@ -11,6 +11,13 @@ description = "HAL implementations for peripherals common among Espressif devic repository = "https://github.com/esp-rs/esp-hal" license = "MIT OR Apache-2.0" +# Prevent multiple copies of this crate in the same binary. +# Needed because different copies might get different features, causing +# confusing build errors due to expected features not getting enabled +# on the unintentional copy. +# This is especially common when mixing crates from crates.io and git. +links = "esp-hal-common" + [dependencies] bitflags = "2.4.1" bitfield = "0.14.0"