Skip to content

Commit bac4c41

Browse files
addaleaxtargos
authored andcommitted
src: deprecate option variables in public API
These variables should never have been exposed as part of the public API, and certainly not as variables. Using CLI options parser is the right thing to do here, at least until we expose some part of the options parser API publicly (which should be possible to do now). PR-URL: #22515 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 9565029 commit bac4c41

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/node.h

+9-6
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,17 @@ typedef intptr_t ssize_t;
199199

200200
namespace node {
201201

202-
// TODO(addaleax): Deprecate and remove all of these ASAP. They have been
203-
// made effectively non-functional anyway.
204-
NODE_EXTERN extern bool no_deprecation;
202+
// TODO(addaleax): Remove all of these.
203+
NODE_DEPRECATED("use command-line flags",
204+
NODE_EXTERN extern bool no_deprecation);
205205
#if HAVE_OPENSSL
206-
NODE_EXTERN extern bool ssl_openssl_cert_store;
206+
NODE_DEPRECATED("use command-line flags",
207+
NODE_EXTERN extern bool ssl_openssl_cert_store);
207208
# if NODE_FIPS_MODE
208-
NODE_EXTERN extern bool enable_fips_crypto;
209-
NODE_EXTERN extern bool force_fips_crypto;
209+
NODE_DEPRECATED("use command-line flags",
210+
NODE_EXTERN extern bool enable_fips_crypto);
211+
NODE_DEPRECATED("user command-line flags",
212+
NODE_EXTERN extern bool force_fips_crypto);
210213
# endif
211214
#endif
212215

src/node_buffer.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727

2828
namespace node {
2929

30-
// TODO(addaleax): Deprecate and remove this ASAP.
31-
extern bool zero_fill_all_buffers;
30+
// TODO(addaleax): Remove this.
31+
NODE_DEPRECATED("use command-line flags",
32+
extern bool zero_fill_all_buffers);
3233

3334
namespace Buffer {
3435

0 commit comments

Comments
 (0)