Skip to content

Commit

Permalink
src: deprecate option variables in public API
Browse files Browse the repository at this point in the history
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 <me@gus.host>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
addaleax authored and targos committed Sep 3, 2018
1 parent 9565029 commit bac4c41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/node.h
Expand Up @@ -199,14 +199,17 @@ typedef intptr_t ssize_t;

namespace node {

// TODO(addaleax): Deprecate and remove all of these ASAP. They have been
// made effectively non-functional anyway.
NODE_EXTERN extern bool no_deprecation;
// TODO(addaleax): Remove all of these.
NODE_DEPRECATED("use command-line flags",
NODE_EXTERN extern bool no_deprecation);
#if HAVE_OPENSSL
NODE_EXTERN extern bool ssl_openssl_cert_store;
NODE_DEPRECATED("use command-line flags",
NODE_EXTERN extern bool ssl_openssl_cert_store);
# if NODE_FIPS_MODE
NODE_EXTERN extern bool enable_fips_crypto;
NODE_EXTERN extern bool force_fips_crypto;
NODE_DEPRECATED("use command-line flags",
NODE_EXTERN extern bool enable_fips_crypto);
NODE_DEPRECATED("user command-line flags",
NODE_EXTERN extern bool force_fips_crypto);
# endif
#endif

Expand Down
5 changes: 3 additions & 2 deletions src/node_buffer.h
Expand Up @@ -27,8 +27,9 @@

namespace node {

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

namespace Buffer {

Expand Down

0 comments on commit bac4c41

Please sign in to comment.