New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codegen updates #2927
Codegen updates #2927
Conversation
This pull request introduces 1 alert when merging 29dc818 into be9b67f - view on LGTM.com new alerts:
|
@markus2330 Once a7 is online again and Jenkins completes all build jobs, this PR can be merged. (At least from my point of view.) |
Thank you! @bauhaus93: here is the new PR. Please try out the tutorials. |
also fix bugs from earlier commits
ce93c24
to
1166a9f
Compare
src/plugins/specload/README.md
Outdated
|
||
However, because the default `resolver` is not compatible with plugins that produce a KeySet without a file present, you can only use | ||
`noresolver`. This means that you cannot set any values. (You will get an error about a non-existent file, if you try.) | ||
- The plugin must be mounted using `noresolver` or another resolver that always calls the storage plugin. To work arround |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The plugin must be mounted using `noresolver` or another resolver that always calls the storage plugin. To work arround | |
- The plugin must be mounted using `noresolver` or another resolver that always calls the storage plugin. To work around |
jenkins build libelektra please |
@markus2330 Any idea why |
This seems to be a transient error. As far as I can tell, libelektra/tests/shell/check_formatting.sh Lines 69 to 76 in 4e0d346
Anyway, I opened pull request #2929, which hopefully gets rid of this error. |
But then the same thing would occur on all the other build jobs as well, wouldn't it? (At least the ones using the same docker image) |
Unfortunately, since this is a transient error (it only happens in rare cases), I think the answer to this question is no. Currently one option to get rid of the error is to restart the build. Since this is a rather bad “solution” – especially considering the stability of the Jenkins build servers –, I opened PR #2929. At least the new version of the test should provide more information on what the specific problem is. Anyway, I am sorry for the false positive. I am pretty I wrote the code that causes these problems. |
This comment has been minimized.
This comment has been minimized.
@bauhaus93 do you have any troubles reviewing the PR? |
We need an update to the |
You can update the debian branch by directly pushing to it (to remove the one file). |
I made the required change to the debian branch. @markus2330 Is it possible for you (when you are logged in) to restart the Jenkins build from the "Build artifacts" stage? It would be a bit of a waste to repeat all the successful builds, when nothing inside the PR has changed. |
Unfortunately, as far as I know that is not possible.
I think so too. I restarted the whole Jenkins build for now. |
That issue is marked as "Resolved" and the release notes, mention that it was release as part of version 1.3. I am not sure which version we are using. |
As far as I know, we do not use the declarative syntax for pipeline stages, which means we are out of luck according to the issue description:
. |
@markus2330 I suggest we merge this huge PR now, since all build jobs succeeded. If there is anything else that needs to change, we can always create a new PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing PR.
@@ -2,32 +2,29 @@ | |||
# | |||
# Variables for the Elektra library: | |||
# | |||
# Elektra_INCLUDE_DIRS - where to find kdb.h, etc. | |||
# Elektra_LIBRARIES - List of libraries when using Elektra. | |||
# Elektra_INCLUDE_DIRS - where to find kdb.h, etc. Elektra_LIBRARIES - List of libraries when using Elektra. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting got broken.
@sanssecours any idea how to avoid this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The easiest option is probably using a fence:
# ~~~
before and after the comment block, just like we did here:
libelektra/cmake/ElektraCache.cmake
Lines 1 to 9 in bc9254c
# ~~~ | |
# CACHE | |
# | |
# Here all cache variables are set | |
# | |
# | |
# If you add something here, make sure to also add it in | |
# src/plugins/constants/ | |
# ~~~ |
.
@@ -82,7 +82,6 @@ matrix: | |||
-multifile;\ | |||
-network;\ | |||
-ni;\ | |||
-noresolver;\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required for specload
and therefore needed for some of the codegen tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then maybe make it mandatory? (src/plugins/CMakeLists.txt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not actually mandatory, since specload
isn't mandatory. Also specload
can work with other resolvers, it is just that right now noresolver
is the only one that works. Other resolvers don't call the storage plugin, if no storage file exists.
# INPUT <plugin> <file> | ||
# OUTPUT_DIR <output_dir> | ||
# KDB <kdb> | ||
# PARAMS <params>... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't PARAMS optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and OPTIONS
, KDB
and OUTPUT_DIR
too. I'll make that more clear.
# | ||
# This will call `<kdb> gen -F <plugin>=<file> <options>... template parent_key output_name <params>...` in the | ||
# directory <output_dir>. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also give an example of how to execute it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can, but does it really help that much, if I add e.g.:
elektra_kdb_gen (highlevel "/sw/org/app/#0/current" elektragen ni spec.ini)
That is all you need to do. CMake will then know which files are produced by kdb gen
and call it, if one of the files is required by a target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think even this example might help. A full usage example might help even more (how to compile the generated files).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full examples can be found in the examples directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then adding links to the examples directories is all what is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should I link to the examples? With a Github link? I don't think the external examples show up on the homepage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The website automatically turns all internal links that are not in the website to github links.
@@ -13,3 +13,4 @@ src/tools/website-frontend/resources/assets/skin/base/fonts/font-awesome/font-aw | |||
src/tools/website-frontend/resources/assets/skin/base/util/space.less: mit | |||
src/tools/web/client/public/Roboto-Light.ttf: apache-2.0 | |||
src/tools/web/client/public/Roboto-Regular.ttf: apache-2.0 | |||
src/tools/kdb/gen/mustache.hpp: BSL-1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for maintaining! I made it now mandatory in f256c0d
While the new `kdb gen` was already included in the last release, it is now fully functional and ready for use. To get started take a look | ||
at the new man-page for [`kdb-gen(1)`](https://www.libelektra.org/manpages/kdb-gen). _(Klemens Böswirth)_ | ||
|
||
If specifically want to use it with the High-Level API take a look at [this tutorial](https://www.libelektra.org/tutorials/high-level-api). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sentence?
While the new `kdb gen` was already included in the last release, it is now fully functional and ready for use. To get started take a look | ||
at the new man-page for [`kdb-gen(1)`](https://www.libelektra.org/manpages/kdb-gen). _(Klemens Böswirth)_ | ||
|
||
If specifically want to use it with the High-Level API take a look at [this tutorial](https://www.libelektra.org/tutorials/high-level-api). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also write about cmake integration.
### <<HIGHLIGHT1>> | ||
### Code Generation | ||
|
||
While the new `kdb gen` was already included in the last release, it is now fully functional and ready for use. To get started take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
productive use?
@@ -150,7 +157,7 @@ you up to date with the multi-language support provided by Elektra. | |||
|
|||
### CMake | |||
|
|||
- <<TODO>> | |||
- `kdbtypes.h` is now generated directly via a CMake `configure_file` call. _(Klemens Böswirth)_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really important. Better write more about the highlight.
@@ -12,10 +12,15 @@ In Elektra different forms of application integrations are possible: | |||
- [Intercept File System](/src/bindings/intercept/fs/README.md) | |||
3. Integration where applications directly use Elektra to read and | |||
store settings. | |||
1. Using the low-level API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to call it "i" and "ii" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, markdown only recognises Arabic numbers as list items. GitHub is quite unique in how it renders nested numbered lists. Most other markdown renderers I tried render all levels with Arabic numerals.
I don't know what we use for the website, but I'll change the references in the text below to 3.1
and 3.2
. IMO it is easier to understand that 3.1
references 3.i
than the other way around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree. Only Arabic numbers is easier.
Re-created from #2805
Contains some updates for the code-generation. For progress see #2680.
Fixes #2866
Basics
doc/news/_preparation_next_release.md
which contains_(my name)_
)Please always add something to the the release notes.
(first line should have
module: short statement
syntax)close #X
, should be in the commit messages.Checklist
Review
Reviewers will usually check the following: