You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 16, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 16, 2025. It is now read-only.
Aliases should be removed (remove kdb aliases #3957), so in the list above " global-mount/gmount" -> only global-mount is relevant.
for export/import we get a new library written by @atmaxinger
for mount/umount we get a new library written by @flo91
validate is more historical, can be dropped
sget recommends an outdated approach, a specification with defaults should be preferred. Some command for scripts, however, would be very nice: some way to tell kdb get that command-line arguments and env variables should be interpreted via gopts.
basename, dirname and namespace should imho be grouped, e.g. key-basename, key-dirname and key-namespace
In the list above, foundational parts are missing (the ones that do not have a command by itself). Have a look in the source folder https://master.libelektra.org/src/tools/kdb what these foundation parts could be. Without any guarantee on completeness:
cmdline parser (we already discussed: it should be done with the gopts plugin, which probably needs improvements on the way)
Coordination work can be done, as necessary, in the issues and also in the meetings all three weeks.
Btw. it would be nice if the source files are named like the command, so meta-ls.c (and not metals.c).
Btw2. have a look at #539. There should be some way with our gopts to do such things (I am not sure if/how POSIXLY_CORRECT is supported). Please add test more cases for kdb, including tests for command-line parsing.
Another feature we might want to solve in this reimplementation is #1610. It needs, however, first some library support. So let us keep this in the background as nice-to-have.
Then there is the question what should happen with kdb-gen which probably would be hard to rewrite and https://github.com/x86-64/mustache-c seems to be dead (last update 2019). I would suggest we make gen an extra tool (to be moved to src/tools/gen). I think this is fine as kdb gen is not used on embedded systems as it is a developer tool. So C++ should be fine. @kodebach What do you think about kdb gen?
Yeah, I don't think rewriting kdb gen as part of this makes sense. For now I'd also say put it into a separate src/tools/gen that is installed somewhere in e.g. /usr/share (not /usr/bin) and can still be invoked as kdb gen (i.e. the C code for kdb gen is just an exec to call the C++ executable if it is installed).
If we want to get rid of the C++ code in the long run, we could switch to Rust. In a quick search I found https://github.com/sunng87/handlebars-rust, which is a library for Handlebars templates (which should be mostly compatible with our Mustache templates, i.e. require little to no change in the templates). The Rust code could be put into a (self-contained) library and called via a C API. Rewriting the kdb gen code in C is probably not worth it.
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖
Activity
markus2330 commentedon Aug 10, 2022
Thank you for creating the issues! (In particular #4432 is very good work, I see you are already diving into Elektra! 🚀).
Some comments about the list above:
kdb getthat command-line arguments and env variables should be interpreted via gopts.In the list above, foundational parts are missing (the ones that do not have a command by itself). Have a look in the source folder https://master.libelektra.org/src/tools/kdb what these foundation parts could be. Without any guarantee on completeness:
Coordination work can be done, as necessary, in the issues and also in the meetings all three weeks.
Btw. it would be nice if the source files are named like the command, so
meta-ls.c(and not metals.c).Btw2. have a look at #539. There should be some way with our gopts to do such things (I am not sure if/how POSIXLY_CORRECT is supported). Please add test more cases for
kdb, including tests for command-line parsing.Another feature we might want to solve in this reimplementation is #1610. It needs, however, first some library support. So let us keep this in the background as nice-to-have.
Then there is the question what should happen with
kdb-genwhich probably would be hard to rewrite and https://github.com/x86-64/mustache-c seems to be dead (last update 2019). I would suggest we makegenan extra tool (to be moved tosrc/tools/gen). I think this is fine askdb genis not used on embedded systems as it is a developer tool. So C++ should be fine. @kodebach What do you think aboutkdb gen?kodebach commentedon Aug 10, 2022
To add to this: coloring should only happen, when outputting to a TTY (see
isatty(3)).If we go with nested commands (#539), we could also use a folder structure (e.g.
meta/ls.c).See examples/goptsCommands.c for example code. It's also explained in the docs.
As explained in the docs, when using sub-commands the position of options like
-vmatters and can change behaviour.Yeah, I don't think rewriting
kdb genas part of this makes sense. For now I'd also say put it into a separatesrc/tools/genthat is installed somewhere in e.g./usr/share(not/usr/bin) and can still be invoked askdb gen(i.e. the C code forkdb genis just anexecto call the C++ executable if it is installed).If we want to get rid of the C++ code in the long run, we could switch to Rust. In a quick search I found https://github.com/sunng87/handlebars-rust, which is a library for Handlebars templates (which should be mostly compatible with our Mustache templates, i.e. require little to no change in the templates). The Rust code could be put into a (self-contained) library and called via a C API. Rewriting the
kdb gencode in C is probably not worth it.flo91 commentedon Oct 4, 2022
@markus2330 Maybe the code for some subcommands can also be rewritten as part of the FLOSS course.
markus2330 commentedon Oct 9, 2022
I don't think that without the framework as basis anything can be done by someone else than @hannes99.
[-]Command-line tooling rewrite[/-][+]Command-line tooling in C[/+]markus2330 commentedon May 2, 2023
We should add the C tooling as an alternative tool, I think we can call it ckdb.
github-actions commentedon May 2, 2024
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖