Closed Pesa closed 3 years ago
I plan to eliminate runtime environment variables altogether:
MGMT
is being removed.GQLSERVER_HTTP
and GQLSERVER
will be replaced by a command line flag --gqlserver
.LOG
will be replaced by API. This does not mean log levels can be changed at runtime.I don't plan to change compile time environment variables, such as RELEASE
and BPFCC
.
Other projects are already using environment variables such as CC
instead of BOOST_CC
.
I don't plan to change compile time environment variables, such as
RELEASE
andBPFCC
. Other projects are already using environment variables such asCC
instead ofBOOST_CC
.
I wasn't referring to those (they are standard), with one exception: RELEASE
... any reason you can't use the standard NDEBUG
? or you want to keep it independent from the behavior of assert
?
LOG
will be replaced by API. This does not mean log levels can be changed at runtime.
I'm not entirely sure what you mean by this and, depending on what you mean, it may not be a good idea.
The logging subsystem must be simple and reliable and work even when other things are broken, because it may be used for debugging those broken things. Making it depend on too many higher-level components such as an external API could compromise its reliability and therefore its usefulness. Being able to configure logging in a simple way via the environment is often a useful feature when you want to quickly debug something.
It turns out that LOG_*
has to remain as environment variables, because static initialization occurs before the activate
mutation.
Thus, I will rename it to NDNDPDK_LOG_*
.
NDEBUG
is a C macro. It is not an environment variable.
I only mentioned NDEBUG
because you mentioned RELEASE
, which is not an env variable either (it's a make variable), and I assumed is turned into a macro of the same name to affect code generation. And the standard macro for that is NDEBUG
. Anyway, as I said, I was not talking about compilation.
RELEASE
, which is not an env variable either (it's a make variable)
oh, it looks like the README tells users to prepend RELEASE=1
so yes, that's technically an env variable. It's a bit strange though, variables to make
are usually passed on the command line, e.g. make CC=foo RELEASE=1
.
RELEASE
needs to be an environment variable during compile time. It is checked by bash scripts invoked by Makefile
.
https://github.com/usnistgov/ndn-dpdk/blob/5782ffdcf31b259051ecfc19b33b4c9f35121145/mk/cflags.sh#L5-L7
It is then passed as CFLAGS
environment variable for meson and written into cgoflags.go
files for Cgo.
@yoursunny has been inventing weird build procedures since 2006, and this isn't the worst...
All runtime environment variables have NDNDPDK_
prefix now.
Many environment variables have very generic names such as
MGMT
andLOG
. Can we rename them to something more project-specific to avoid conflicts? e.g. add anNDNDPDK_
prefix or similar.