# Why wasn't there a \`DEPRECATED\` tag used for \`OneShot.double\_tap\_sticky\` etc

**URL:** https://community.keyboard.io/t/why-wasnt-there-a-deprecated-tag-used-for-oneshot-double-tap-sticky-etc/2464
**Category:** Programming
**Created:** [January 27, 2019, 7:13am UTC](https://community.keyboard.io/t/why-wasnt-there-a-deprecated-tag-used-for-oneshot-double-tap-sticky-etc/2464 "2019-01-27T07:13:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jamadagni](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jamadagni/32/2030_2.png) [@jamadagni](https://community.keyboard.io/u/jamadagni)
#### Post date: [January 27, 2019, 7:13am UTC](https://community.keyboard.io/t/why-wasnt-there-a-deprecated-tag-used-for-oneshot-double-tap-sticky-etc/2464/1 "2019-01-27T07:13:37Z")

</div>

At [https://github.com/keyboardio/Kaleidoscope/commit/dbaba6c1ef068aa34a0a7970494594b0a80ae9bd#diff-fe09b5bc90a39e2fb10f87f678f3e4edR82](https://github.com/keyboardio/Kaleidoscope/commit/dbaba6c1ef068aa34a0a7970494594b0a80ae9bd#diff-fe09b5bc90a39e2fb10f87f678f3e4edR82) I see that the deprecated `Layer` methods were tagged with `DEPRECATED` which ensured that a deprecation message would be emitted while compiling, but at [https://github.com/keyboardio/Kaleidoscope/commit/7ccb5bfa635508c5d305d422e138c930576c9dfa#diff-8f9c1338eaf62f816d813b24392771cbR441](https://github.com/keyboardio/Kaleidoscope/commit/7ccb5bfa635508c5d305d422e138c930576c9dfa#diff-8f9c1338eaf62f816d813b24392771cbR441) I don’t see the same done for `OneShot`. Was this merely an oversight?

I note that the deprecation messages are placed inside `src/kaleidoscope_internal/deprecations.h` so is it because `OneShot` is a plugin but `Layer` is Kaleidoscope internal that such a message wasn’t added there?

---

<div class="post-metadata">

### Author: ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)
#### Post date: [January 27, 2019, 7:15am UTC](https://community.keyboard.io/t/why-wasnt-there-a-deprecated-tag-used-for-oneshot-double-tap-sticky-etc/2464/2 "2019-01-27T07:15:52Z")

</div>

We didn’t add one for OneShot, because we couldn’t. We can add deprecation messages to _methods_, but not to _member variables_. That’s one of the reasons we’re trying to transition to using accessors for new code.

---

<div class="post-metadata">

### Author: ![jamadagni](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jamadagni/32/2030_2.png) [@jamadagni](https://community.keyboard.io/u/jamadagni)
#### Post date: [January 27, 2019, 7:31am UTC](https://community.keyboard.io/t/why-wasnt-there-a-deprecated-tag-used-for-oneshot-double-tap-sticky-etc/2464/3 "2019-01-27T07:31:54Z")

</div>

OK. If I wanted a plugin method to be deprecated, would it still go into the same deprecation header though it’s not “internal”?

---

<div class="post-metadata">

### Author: ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)
#### Post date: [January 27, 2019, 7:39am UTC](https://community.keyboard.io/t/why-wasnt-there-a-deprecated-tag-used-for-oneshot-double-tap-sticky-etc/2464/4 "2019-01-27T07:39:32Z")

</div>

You can put the deprecation message anywhere, it doesn’t have to be in `src/kaleidoscope_internal/deprecations.h`, you can put it in your plugin header too. As long as the `#define` name is `_DEPRECATED_MESSAGE_something`, `DEPRECATED(something)` will work.

See the [`HostOS.autoDetect()`](https://github.com/keyboardio/Kaleidoscope-HostOS/commit/985e31b48b8022c77fa22c92c1c3acfc0fc2f1ac#diff-4e751ceb1df1d8589cf8c33d527ad395R37) deprecation for example, which was in `HostOS.h`. For plugins, I think the most straightforward thing is to place the message in the plugin header, whether the plugin is part of the monorepo or not.

`src/kaleidoscope_internal/deprecations.h` should only be used for deprecations in core Kaleidoscope (ie, not plugins).
