Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Decisions #3549

Merged
merged 50 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
43d61aa
doc: add quick link
Nov 3, 2020
37a77f5
doc: small improvements in get started
Nov 3, 2020
f0a6fc2
doc: swap hello C and application integration tut
Nov 3, 2020
1f58971
cmake: ignore two variables
Nov 3, 2020
cf07d1e
doc: write release notes
Nov 3, 2020
330eef5
doc: decision for vendor_spec
Nov 3, 2020
df569af
doc: as discussed in meeting
Nov 3, 2020
3308e72
doc: change decision as discussed
Nov 3, 2020
3950728
doc: update global_validation.md as discussed
Nov 3, 2020
3131c2d
doc: rework boolean
Nov 3, 2020
e07dac1
doc: add 3 decisions
Nov 3, 2020
cc280cc
doc: merge similar decisions
Nov 3, 2020
ca32fdc
Restyled by prettier-markdown
restyled-commits Nov 3, 2020
49a324e
doc: write rationale for semantics_name.md
Nov 4, 2020
dfe3d64
doc: add open points from #2698
Nov 4, 2020
25b96fa
doc: tip for #3491
Nov 5, 2020
d08e265
doc: clarify valid array
Nov 9, 2020
b372834
doc: make boolean definition stricter
Nov 9, 2020
df3a509
decisions: ensure
Nov 9, 2020
1dd7fb1
Restyled by prettier-markdown
restyled-commits Nov 9, 2020
2e3cf5e
Update doc/decisions/semantics_name.md
markus2330 Nov 9, 2020
7b35fcf
decisions: add advantage of ®
Nov 9, 2020
fbe13d3
Restyled by prettier-markdown
restyled-commits Nov 9, 2020
bf901a0
decisions clarify sentence
Nov 9, 2020
1ff7c67
decisions: clarify arbitrary metadata
Nov 9, 2020
8ad525f
decisions: fix spelling
Nov 9, 2020
a644490
Update doc/decisions/boolean.md
markus2330 Nov 10, 2020
60383f7
Update doc/decisions/semantics_name.md
markus2330 Nov 10, 2020
94a33e9
decisions: rework spec metadata
Nov 10, 2020
b918c03
decisions: rework boolean
Nov 10, 2020
1464dfd
Restyled by prettier-markdown
restyled-commits Nov 10, 2020
b60f382
decision: apply suggestion
Nov 10, 2020
5a89d21
decision: kdbOpen contract
Nov 10, 2020
90dd882
Restyled by prettier-markdown
restyled-commits Nov 10, 2020
ee72c8f
Update doc/decisions/boolean.md
markus2330 Nov 10, 2020
80a2548
Update doc/decisions/spec_expressiveness.md
markus2330 Nov 10, 2020
aabb2e5
metadata: move internal up
Nov 11, 2020
f5b3173
doc: clarify about name in toml
Nov 11, 2020
8462af0
metadata: a bit cleanup
Nov 11, 2020
f290b8e
decisions: improve ensure API
Nov 17, 2020
9fd8ae4
Update doc/decisions/ensure.md
markus2330 Nov 17, 2020
601ad52
decisions: shorten links
Nov 19, 2020
c6a4c9b
decisions: added error_semantics
Nov 19, 2020
dabdae0
decision: make clear that API is an open point
Nov 19, 2020
289a9ae
decisions: clarify API
Nov 19, 2020
a13a362
spelling: fix+comment how to apply
Nov 19, 2020
3b7bfd6
decisions: also be strict about specifications
Nov 19, 2020
755a762
decisions: as discussed during meeting
Dec 2, 2020
400bdc0
metadata: readd as it is actually implemented
Dec 3, 2020
b043ef8
decisions: fix typos
markus2330 Dec 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ These points need to be fulfilled for every PR:
- [ ] Details of what you changed are in commit messages
(first line should have `module: short statement` syntax)
- [ ] References to issues, e.g. `close #X`, are in the commit messages.
- [ ] The buildservers are happy.
- [ ] The buildservers are happy. If not, fix **in this order**:
- [ ] add a line in `doc/news/_preparation_next_release.md`
- [ ] reformat the code with `scripts/dev/reformat-all`
- [ ] make all unit tests pass
- [ ] fix all memleaks
- [ ] The PR is rebased with current master.

If you have any troubles fulfilling these criteria, please write
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ applications' configurations, leveraging easy application integration.

## Often Used Links

- If you are new, start reading [Get Started](doc/GETSTARTED.md)
- [Build server](https://build.libelektra.org/)
- [Website](https://www.libelektra.org)
- [API documentation](https://doc.libelektra.org/api/latest/html/)
Expand Down
17 changes: 14 additions & 3 deletions doc/GETSTARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@
cmake .. # watch output to see if everything needed is included
# optionally run "ccmake .." to get an overview of the available build settings (needs cmake-curses-gui)
cmake --build build -- -j5
cmake --build build --target run_nokdbtests #optional: run tests
```

With these commands you will be able to run the "Hello World!" example but usually you will need to use some of the [plugins](/src/plugins/README.md), tools and bindings of Elektra. Please take a look to the more detailed [compiling documentation](/doc/COMPILE.md). After you completed building Elektra on your own, you can execute these commands to install Elektra (please check the [installation documentation](/doc/INSTALL.md) if you are using Debian):
Optional you can also run tests, see [here for more information](/doc/TESTING.md):
markus2330 marked this conversation as resolved.
Show resolved Hide resolved

```sh
cmake --build build --target run_nokdbtests
```

With these commands you will be able to run the "Hello World!" example but usually you will need to use some of the [plugins](/src/plugins/README.md), tools and bindings of Elektra. Please take a look to the more detailed [compiling documentation](/doc/COMPILE.md). After you completed building Elektra on your own, you can execute these commands to install Elektra (please check the [installation documentation](/doc/INSTALL.md) for the many available packages):
markus2330 marked this conversation as resolved.
Show resolved Hide resolved

```sh
sudo make install
Expand All @@ -71,7 +76,13 @@

[Installation documentation](/doc/INSTALL.md) contains further information about available packages.

Optional you can also run tests to verify the installed Elektra, see [here for more information](/doc/TESTING.md):
markus2330 marked this conversation as resolved.
Show resolved Hide resolved

```sh
kdb run_nokdbtests
```

- Hello World!

Start with your very first Elektra application and follow these steps:
Start with your very first Elektra application in C and follow these steps:
[Hello World!](/doc/tutorials/hello-elektra.md)
58 changes: 23 additions & 35 deletions doc/METADATA.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ version/minor=6

#
# Important metadata often used in configuration files
# (and seldom in specifications)
# and not used in specifications.
#

[order]
Expand Down Expand Up @@ -153,14 +153,18 @@ description= The spaces/tabs used between a comment and the beginning of the
example=




[line]
type= int
status= proposal
description= contains the line number from which a key was read.
note= is useful for validation problems when someone directly
edits files
[internal/<plugin>/*]
status= implemented
usedby/plugin=
description= Internal metadata that must be ignored by other plugins.
It is useful for reconstruction of information about keys between
kdbGet and kdbSet.
Always avoid to use it if there is any other metadata that
can be used instead.
For example, if a type can be represented with the CORBA
type system, metadata `type` should be used.
Only if a type cannot be represented, e.g., the `toml`
plugin would use `internal/toml/type`.



Expand Down Expand Up @@ -255,7 +259,7 @@ description= For this metadata only the presence is significant, not its value.

[array]
type= array-index
status= proposed
status= implemented
description= Such keys have only keys conforming to Elektra’s arrays convention as subkeys.
If the metavalue is empty, the array is empty (no subkeys).
Otherwise the metavalue contains the last element.
Expand Down Expand Up @@ -300,9 +304,9 @@ note= It is generally preferred that other metadata will be used to
deduce the needs of the specification, e.g. use check/validation
metadata instead of as given above.

[config]
[config/needs]
type= string
status= proposed
status= implemented
description= indicate that the mount point needs some
configuration for plugins in order to work.

Expand Down Expand Up @@ -753,18 +757,6 @@ description = a number of warnings, see src/error/specification



#
# Struct validation
#


[struct]
type = vector <string>
status = proposed
description = checks if the subkeys form a valid struct with the given
names.
The validator makes sure that there are no keys for the struct missing.
example = device mpoint type options [dumpfreq] [passno]


#
Expand Down Expand Up @@ -962,12 +954,6 @@ type= string
description= A ternary conditional style operator to define
relations between keys

[condition/validsuffix]
status= proposal
usedby/plugin= conditionals
type= string
description= A unit of measure style prefix

[check/condition/any/#]
status= implemented
usedby/plugin= conditionals
Expand All @@ -986,6 +972,12 @@ usedby/plugin= conditionals
type= string
description= An array of multiple condition statements

[condition/validsuffix]
status= implemented
usedby/plugin= conditionals
type= string
description= A unit of measure style prefix

[assign/condition]
status= implemented
usedby/plugin= conditionals
Expand Down Expand Up @@ -1051,7 +1043,7 @@ description= Trigger an error with given error number from src/error/specificati
[trigger/error/nofail]
usedby/plugin= error
type= long
status= proposal
status= implemented
description= Add the error but do not fail (to test robustness of framework).

[check/macaddr]
Expand All @@ -1069,10 +1061,6 @@ status= idea
description= Flag keys that will be removed in further versions
note= thanks to Config::Model for that idea

[internal/<plugin>/*]
status= implemented
description= Internal metadata to be ignored by other plugins.

[source]
status= idea
description= states where a key comes from if it is not from an ordinary
Expand Down
33 changes: 21 additions & 12 deletions doc/decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,34 @@ section here.
- [High Level API](high_level_api.md)
- [Error codes](error_codes.md)
- [Error code implementation](error_code_implementation.md)
- [Semantics for Name](semantics_name.md)
- [Base Name](base_name.md)
- [Lookup every key](lookup_every_key.md)
- [Holes and Non-leaf values](holes.md)
- [Multiple File Backends](multiple_file_backends.md)
- [Boolean](boolean.md)

## In Progress

- [Global Plugins](global_plugins.md) (@mpranj)
- [Ensure](ensure.md) (@kodebach)
- [Capabilities](capabilities.md) (@markus2330)
- [Error Semantics](error_semantics.md) (API)

## Decided

- [Array for Warnings](warning_array.md)
- [Array](array.md)

## In Discussion

- [Semantics for Name](semantics_name.md)
- [Base Name](base_name.md)
- [Escaped Name](escaped_name.md) merge with:
- [Store the escaped and/or unescaped key name](store_name.md)
- [Sources for Metadata](metadata_sources.md)
- [Lookup every key](lookup_every_key.md)
- [Holes and Non-leaf values](holes.md)
- [Arbitrary Meta-Data](arbitrary_metadata.md)
- [Multiple File Backends](multiple_file_backends.md)
- [Capabilities](capabilities.md)
- [Array](array.md)
- [Boolean](boolean.md)
- [Global Plugins](global_plugins.md)
- [Vendor Spec](vendor_spec.md)
- [Spec Expressiveness](spec_expressiveness.md)
- [Metadata in Spec Namespace](spec_metadata.md)

## Delayed

- [Plugin Variants](plugin_variants.md)
- [Global Validation](global_validation.md)

Expand All @@ -66,3 +74,4 @@ section here.
- [Null Pointer Checks](null_pointer_checks.md)
- [Elektra Web Publish Subscribe](elektra_web_pubsub.md)
- [Internal Cache](internal_cache.md)
- [Vendor Spec](vendor_spec.md)
39 changes: 0 additions & 39 deletions doc/decisions/arbitrary_metadata.md

This file was deleted.

24 changes: 17 additions & 7 deletions doc/decisions/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ an array or not.
## Decision

Store length in metadata `array` of key, or keep metadata `array` empty if empty array.
Only children that have `#` syntax are allowed in a valid array.
The index start with `#0`.
Both `keyAddName("#12")` or `keyAddBaseName("#_12")` is allowed to add the 13th index.
markus2330 marked this conversation as resolved.
Show resolved Hide resolved

For example (`ni syntax`, sections used for metadata):

```
Expand All @@ -40,8 +44,8 @@ myarray/#5 = value5
It is not allowed to have anything else than `#5` in the metadata `array`,
e.g. even `#4` would be a malformed array.

The metadata `array` preferable should be in `spec` (specified configuration).
Then the `spec` plugin will add the `array` marker with the correct length.
With the metadata `array` in `spec:/` the `spec` plugin will add the
`array` marker with the correct length.
This needs to be happen early, so that plugins can rely on having
correct arrays.

Expand Down Expand Up @@ -76,12 +80,12 @@ user:/myarray/#0
system:/myarray # <- not found in cascading lookup, as user:/myarray exists
```

Guarantees we want from the spec plugin:
The `spec` plugin should check if it is a valid array, i.e.:

- that the parent key always contain `array`.
- that the correct length is in `array`
- that the array only contains `#` children
- that the children are numbered from 0 to n, without holes
- that the parent key always contain the metadata `array`,
markus2330 marked this conversation as resolved.
Show resolved Hide resolved
- that the correct length is in `array`,
- that the array only contains `#` children, and
- that the children are numbered from `#0` to `#n`, without holes.

## Rationale

Expand All @@ -98,11 +102,17 @@ Guarantees we want from the spec plugin:
which is a possibility also in all the alternatives of this decision.
- A `user:/` or `dir:/` key can change the semantics of a `system:/` array,
if not avoided by `spec`.
- user-facing documentation should contain a note like:
"Mixing array and non-array keys in arrays is not supported.
In many cases the trivial solution is to move the array part into a separate child-key."

## Related Decisions

- [Global Plugins](global_plugins.md)
- [Global Validation](global_validation.md)
- [Base Names](base_name.md)
- [Metadata in Spec Namespace](spec_metadata.md)
- [Spec Expressiveness](spec_expressiveness.md)

## Notes

Expand Down
Loading