libelektra icon indicating copy to clipboard operation
libelektra copied to clipboard

Remove internal iterators from C++ API

Open kodebach opened this issue 3 years ago • 6 comments

The internal iterator API (listed in #3171) will be removed from the C API. Corresponding functions need to removed from the C++ API and direct all uses within C++ code need to be replaced appropriately.

  • [ ] Remove all functions (rewind, next, setCursor, etc.) that map to the internal iterators API (keyRewind, keyNext, etc.)
  • [ ] Replace all usage of these functions and all direct uses of the C API for the internal iterators with alternatives

Note: Fully fixing this issue may require fixing #4279 as well. Some of the SWIG bindings refer to functions that will be removed with this issue.

kodebach avatar Mar 14 '22 22:03 kodebach

Can be implemented as small project or big T3 work.

markus2330 avatar Mar 15 '22 08:03 markus2330

@markus2330 Please check whether the CM points need to adjusted, since this issue may partly be blocked by #4279.

kodebach avatar Mar 16 '22 10:03 kodebach

Hello, @Milangs and I want to work on this issue for our CM-project. I think it's convenient that we additionally do #4279 and #4281 for the teamwork, because the three issues are related.

flo91 avatar Mar 17 '22 08:03 flo91

Remove internal iterators is an excellent job for project and teamwork. It is probably best to start replacing it in bindings (Ruby etc.), and then C++ iterator to use the external iterator instead; and finally remove the internal iterator from C (rewriting code with the external iterator instead).

markus2330 avatar Mar 20 '22 16:03 markus2330

Rationale for the change: When the client (i.e. the programmer) controls the iteration, the iterator is called external iterator. Otherwise, when the iterator controls the iteration, it is called internal iterator. Due to the fact that external iterators are more flexible the internal iterators will be removed completely from Elektra.

Milangs avatar Mar 31 '22 02:03 Milangs

Everything finished except following issue: https://github.com/ElektraInitiative/libelektra/pull/4354#discussion_r884688010

Milangs avatar Jun 22 '22 14:06 Milangs

@flo91 could this one more project? Or simply as normal issue?

markus2330 avatar Sep 25 '22 13:09 markus2330

@flo91 could this one more project? Or simply as normal issue?

For a project, the remaining work probably is a bit too small. I suggest to offer it as a big normal issue.

Additionally, I'd extend the scope to also remove the remaining internal iterations from the C-Code (see https://github.com/ElektraInitiative/libelektra/issues/3171)

flo91 avatar Oct 04 '22 22:10 flo91

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 :sparkling_heart:

github-actions[bot] avatar Nov 28 '23 01:11 github-actions[bot]

I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:

github-actions[bot] avatar Dec 12 '23 01:12 github-actions[bot]