server_version_full()

0 views
Skip to first unread message

Tim van Dijen

unread,
May 27, 2017, 7:38:33 AM5/27/17
to MOO-...@googlegroups.com
Hello all,

I want to make a server_info() builtin that holds most of the info that
server_version() is now returning (like compile-options and features),
because I feel the info is misplaced now.
My idea is to have the builtin return a map instead of the current
array, and even add some extra info like commandline-arguments
(database-file, dump-file, log-file, maybe the process-id), but when I
started looking at server_version_full() (version.c) my head kind of
exploded =-O

All those macros are making this code unreadable to me, so I decided to
work my way around them.
But now I'm stuck.. How should I pull the info from version_options.h?
Any suggestions?

- Tim

Todd Sundsted

unread,
May 27, 2017, 9:05:36 AM5/27/17
to MOO Talk
Yeah, my head exploded when I first saw that code! :-)

I would try to use it, rather than replace it, if possible. I strongly suspect that if you want to replace it with some other mechanism that returns at least the same information (plus whatever you add), you are going to need something as complicated. You could replace the Perl with something more modern, but you'd still need a script of some kind to expose the options and their value as code. And the macros automate/hide a lot of boiler plate that you'd have to type by hand.

Todd
Reply all
Reply to author
Forward
0 new messages