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

Unify type system #1092

Closed
4 of 8 tasks
markus2330 opened this issue Nov 13, 2016 · 5 comments
Closed
4 of 8 tasks

Unify type system #1092

markus2330 opened this issue Nov 13, 2016 · 5 comments
Assignees
Milestone

Comments

@markus2330
Copy link
Contributor

markus2330 commented Nov 13, 2016

Currently, Elektra does not provide a single type system, but different plugins and bindings use different data types and different metadata for describing them (check/type vs. type).

Some places where currently types are used:

  • src/plugins/type implements check/type via CORBA data types
  • src/include/kdbtypes.h header files for CORBA data types
  • high-level API uses CORBA data types
  • internalnotification Internalnotification Plugin #828 uses CORBA data types
  • src/plugins/yajl has JSON types stored in type (see yajl: Elektra's boolean not supported  #2571)
  • src/bindings/jna uses Java parse* functions (not checking or storing metadata)
  • ruby, python, lua also use their own types

obsolete

  • code generators (src/tools/gen/) mostly use C/C++ types

Could you check/fix these places for consistency (value ranges, sign, ...) and document the type system at a single place? (So that the next plugins/bindings can simply implement what the document says)

@markus2330
Copy link
Contributor Author

kdb get<int> does not throw if the type is actually boolean (0 or 1, check/type=boolean)

@markus2330
Copy link
Contributor Author

Expected outcome is:

  • documenting the interrelations of where metadata check/type is used
  • fixing issues (e.g. that metadata type is currently not checked in C++ API)
  • more unit tests of typed access

@markus2330 markus2330 mentioned this issue Feb 5, 2017
@markus2330
Copy link
Contributor Author

To be fully compatible with CORBA types, we should:

  • define mappings to our bindings
  • add wchar
  • add type safe CORBA Any type in C++ layer
  • deprecate/remove empty and FSType

@markus2330
Copy link
Contributor Author

@kodebach I assigned you as you were already working on it in #2399,

@markus2330
Copy link
Contributor Author

@kodebach is this still open? src/plugins/yajl might be fixed already. Please reopen if something is missing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants