Skip to content

Commit f9bc83c

Browse files
committed
[ci] Enforce deprecation expiration dates
1 parent 43258ed commit f9bc83c

File tree

12 files changed

+18
-2
lines changed

12 files changed

+18
-2
lines changed

.github/workflows/linux.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ jobs:
3333
if: always()
3434
run: |
3535
python3 tools/scripts/rm_whitespace.py
36+
- name: Check for Expired Deprecations
37+
if: startsWith(github.head_ref, 'release/')
38+
run: |
39+
egrep -rI "DEPRECATED?:? +`basename ${{ github.head_ref }}`" . || true
40+
return $(egrep -rI "DEPRECATED?:? +`basename ${{ github.head_ref }}`" . | wc -l)
3641
- name: Synchronize Documentation
3742
if: always()
3843
run: |

repo.lb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def init(repo):
238238
config = {v.strip(): (module.parent / "board.xml") for v in versions}
239239
repo.add_configuration(Configuration(name, description, config, versions[0].strip()))
240240

241-
# Backwards compatible move, remove this in 2022.
241+
# DEPRECATE: 2022q1
242242
repo.add_alias(Alias(name="blue-pill", destination=":blue-pill-f103",
243243
description="Renamed for clarity."))
244244
repo.add_alias(Alias(name="black-pill", destination=":black-pill-f103",

src/modm/architecture/interface/delay.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ inline void delay(std::chrono::duration<Rep, Period> time)
105105
{ delay(std::chrono::duration_cast<std::chrono::milliseconds>(time)); }
106106

107107
// The old methods are deprecated
108+
// DEPRECATE: 2022q1
108109
[[deprecated("Use `modm::delay_ns(uint32_t ns)` instead!")]]
109110
inline void delayNanoseconds(uint32_t ns) { delay_ns(ns); }
110111

src/modm/board/board.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ using namespace std::chrono_literals;
1717
#endif
1818

1919
namespace Board {
20+
// DEPRECATE: 2022q1
2021
using systemClock [[deprecated("Use `Board::SystemClock` instead!")]] = SystemClock;
2122
}

src/modm/board/module.lb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def prepare(module, options):
1818
# The modm_abandon function uses delay functions
1919
module.depends(":architecture:delay", ":architecture:assert")
2020

21-
# Backwards compatible move, remove this in 2022.
21+
# Backwards compatible move, DEPRECATE: 2022q1
2222
module.add_alias(Alias(name="blue-pill", destination="blue-pill-f103",
2323
description="Renamed for clarity."))
2424
module.add_alias(Alias(name="black-pill", destination="black-pill-f103",

src/modm/debug/logger/imp/std.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313

1414
#include <modm/debug/logger.hpp>
1515

16+
// DEPRECATE: 2022q1
1617
#warning "Inclusion of 'modm/debug/logger/imp/std.hpp' is deprecated! Only include 'modm/debug/logger.hpp' and remove '.../imp/std.hpp'."

src/modm/math/utils/arithmetic_traits.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ using UnsignedType = typename detail::MakeUnsigned<T>::type;
191191
template<typename T>
192192
struct ArithmeticTraits
193193
{
194+
// DEPRECATE: 2022q1
194195
static constexpr bool isFloatingPoint [[deprecated("use std::is_floating_point_v<T> instead!")]] = std::is_floating_point_v<T>;
195196
static constexpr bool isInteger = std::is_integral_v<T>
196197
&& !std::is_same_v<std::decay_t<T>, bool>;

src/modm/platform/adc/stm32f0/adc.hpp.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ public:
314314
static inline void
315315
acknowledgeInterruptFlags(InterruptFlag_t flags);
316316

317+
// DEPRECATE: 2022q1
317318
[[deprecated("Use `acknowledgeInterruptFlags(InterruptFlag_t flags)` instead!")]]
318319
static inline void
319320
acknowledgeInterruptFlag(InterruptFlag_t flags)

src/modm/platform/clock/stm32/rcc.hpp.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ public:
593593
enablePllSai(const PllSaiFactors& pllFactors, uint32_t waitCycles = 2048);
594594
%% endif
595595

596+
// DEPRECATE: 2022q1
596597
%% if target.family in ["f2", "f4", "f7", "l4", "g0", "g4"]
597598
/**
598599
* Enable PLL.
@@ -950,6 +951,7 @@ private:
950951
computeFlashLatency(uint32_t Core_Hz, uint16_t Core_mV);
951952
};
952953

954+
// DEPRECATE: 2022q1
953955
using ClockControl [[deprecated("Please use `modm::platform:Rcc` instead")]] = Rcc;
954956

955957
} // namespace modm::platform

src/modm/platform/timer/stm32/general_purpose_base.hpp.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public:
116116
ForceInactive = TIM_CCMR1_OC1M_2,
117117
/// Output is forced high
118118
ForceActive = TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0,
119+
// DEPRECATE: 2022q1
119120
ForceLow [[deprecated("Use ForceInactive instead.")]] = ForceInactive,
120121
ForceHigh [[deprecated("Use ForceActive instead.")]] = ForceActive,
121122

0 commit comments

Comments
 (0)