-
Notifications
You must be signed in to change notification settings - Fork 122
Keyname overhaul #3555
Keyname overhaul #3555
Conversation
@markus2330 Please check, if the new Python reference implementation and the documentation matches the decisions in #3549. The changes can be found in this commit: ae05d31 If everything matches, I will update the C implementation so that this PR can be merged ASAP. Then we can start on the other API changes ( |
I looked at ae05d31, I would simplify it and give away this special handling about |
The part with . and .. looks perfect to me now! 🥇 |
I already explained it a bit, but here is a more in depth explanation:
Just based 2 we already need at least some form of escaping mechanism, or To have the 1:1 relation the I actually just noticed that the check for "#": lambda part: re.match(r"^\\#[1-9][0-9]{1,18}$", part) and (len(part) < 21 or part[2:] <= "9223372036854775807"), |
Thank you, I was just missing what you write here in the docu! With this fixed the commit looks fine. Is there any other specific part which needs a closer look? |
Squashed (and fixed) commit of the following: commit 541e404 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Fri Oct 23 17:50:26 2020 +0200 proposal and demo for new api commit 29fb355 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Oct 20 21:11:01 2020 +0200 add TODO commit b169534 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Mon Oct 12 17:25:38 2020 +0200 fix footnote commit 60c508b Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Oct 11 16:55:20 2020 +0200 add TODO commit 7da783d Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Oct 11 16:44:46 2020 +0200 Remove keyIsInactive and plugin 'hidden' commit 2f167d5 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Fri Oct 9 14:38:56 2020 +0200 Update release notes commit 1429765 Author: kodebach <23529132+kodebach@users.noreply.github.com> Date: Mon Oct 12 17:25:24 2020 +0200 Apply suggestions from code review Co-authored-by: markus2330 <markus2330@users.noreply.github.com> commit 2fdb2dc Author: kodebach <23529132+kodebach@users.noreply.github.com> Date: Sun Oct 11 20:28:12 2020 +0200 Apply suggestions from code review Co-authored-by: markus2330 <markus2330@users.noreply.github.com> commit 3ae0fb7 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat Oct 3 21:32:05 2020 +0200 fix spelling commit 6feba9c Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat Oct 3 20:51:13 2020 +0200 Finish new documentation and extend release notes commit a026717 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat Oct 3 14:08:19 2020 +0200 Add Key Name documentation - Add a Python reference implementation - Start documentation README commit 6120185 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat Oct 3 00:57:21 2020 +0200 ccode: fix oclint issue commit 495410c Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Fri Oct 2 20:34:50 2020 +0200 fix bug in keyname validation commit 0616290 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Fri Oct 2 18:36:12 2020 +0200 ccode: fix en-/decoding bug commit abe9dd7 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Fri Oct 2 15:41:35 2020 +0200 Update shell test data commit 8b47125 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 29 20:21:29 2020 +0200 Update release notes commit f90ec81 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 29 20:11:44 2020 +0200 fix swig compile flags commit 4403f12 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Mon Sep 28 20:13:22 2020 +0200 Update Keynames proposal commit 76c5529 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Wed Sep 23 20:19:30 2020 +0200 update some bits of the C++ binding commit 6edcb87 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Wed Sep 23 18:53:56 2020 +0200 update TODOs commit f42102b Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Wed Sep 23 18:29:12 2020 +0200 remove various deprecated things commit 3a63e42 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Wed Sep 23 18:12:56 2020 +0200 fix website build commit 151f770 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Wed Sep 23 00:53:18 2020 +0200 fix oclint errors commit bb90d37 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 23:38:20 2020 +0200 fix oclint errors commit e5a0611 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 22:28:17 2020 +0200 fix oclint errors (again) commit b9a5021 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 22:21:38 2020 +0200 Revert "Revert "adapt ruby code to work with ruby 2.3"" This reverts commit 2e8f936. commit 25a788e Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 22:21:35 2020 +0200 Revert "fix oclint errors" This reverts commit 8703b05. commit 5865fa6 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 22:21:32 2020 +0200 Revert "fix ccode" This reverts commit ffebe18. commit 7e7de68 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 21:37:04 2020 +0200 Revert "adapt ruby code to work with ruby 2.3" This reverts commit eebd51a. commit 4703b86 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 21:02:52 2020 +0200 adapt ruby code to work with ruby 2.3 commit ca687a9 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 20:57:08 2020 +0200 fix ccode commit d54ed1a Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 20:54:09 2020 +0200 fix oclint errors commit 8eb9717 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 18:50:29 2020 +0200 fix JNA keyCmp commit 2c1850e Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 18:09:55 2020 +0200 remove TODO commit b6894d4 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 18:03:51 2020 +0200 fix disabled pythongen commit 291dded Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 18:01:29 2020 +0200 remove debian-stretch-full-ini Jenkins job commit e8e6d4b Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 18:00:05 2020 +0200 add ELEKTRA_NO_SANITIZE_ADDRESS for gcc commit 0e7890c Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 17:55:31 2020 +0200 fully disable pythongen commit 85d7224 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Tue Sep 22 17:50:12 2020 +0200 disable more santizers in opmphmHashfunction commit 63c29ca Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 22:22:19 2020 +0200 fix kdb gen commit 1e47869 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 22:08:29 2020 +0200 update man page commit be60437 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 21:52:59 2020 +0200 fix more keynames commit 6d9be23 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 21:22:40 2020 +0200 fix .gitignore and add missing files commit 74d7229 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 21:07:26 2020 +0200 fix javascript formatting commit e59e9a5 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 20:50:02 2020 +0200 update some files missed in rebase commit d0102d7 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 20:00:58 2020 +0200 remove some files commit c9f0b99 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 20:00:28 2020 +0200 Revert "undo changes to kdb-global-umount test" This reverts commit 3716959. commit 6521996 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 19:15:11 2020 +0200 fix testcpp_contextual_update commit 350ad25 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 18:48:43 2020 +0200 undo changes to kdb-global-umount test commit 8390278 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 18:21:55 2020 +0200 update TODOs commit 529c2ec Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 18:02:11 2020 +0200 fix kdb-global-umount commit d93027f Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sun Sep 20 17:27:35 2020 +0200 fix various memory problems commit 1bf60ee Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat Sep 5 16:57:55 2020 +0200 java: fix after keyname overhaul commit 33c2c53 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat Sep 5 16:35:51 2020 +0200 fix formatting commit 0486d04 Author: Klemens Böswirth <k.boeswirth+git@gmail.com> Date: Sat May 30 14:34:43 2020 +0200 Keyname overhaul Squashed version of 22ff913..3645f79
Fixes 1:1 mapping by removing collision between keys like / and /%
f9b7ac4
to
ab37756
Compare
@mpranj This PR should finally be ready this weekend. It would be nice, if don't merge any PRs until the meeting on Monday (too avoid more rebases, which are quite annoying in such a big PR). @markus2330 Not sure, how much you actually want to review. Everything should™ be the same as the Python code and documentation you already reviewed. However, I had to make a small change (see also 5839dd4): An escaped key name that is just (namespace +) |
Not sure what's wrong with the |
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.
Incredible work!
I only looked through https://github.com/ElektraInitiative/libelektra/pull/3555/files/7f767a442377cdb7c80db71cd52f8b3b35e99864..99e0766a86212a3ca0041e7f40165a0341da03c2
Even if someone finds further problems in this PR, I think it is better if we fix them in follow-up PRs. This already worked quite well with @kodebach several times in the past.
So I agree we should merge it before any other PR, @kodebach has already rebased often enough. As master is now broken anyway, we can also merge right away and fix master afterwards. Then it is easier to help @kodebach with the remaining minor issues (like the pdflatex build).
In that case, I will have another look at the |
@markus I got as far as figuring out that something about |
Some UTF-8 chars, which are not declared for LaTeX (in doc/markdownlinkconverter/elektraSpecialCharacters.sty) break the pdf build. Maybe it is the (r) sign? |
Hm, yes that could be that case. It would be an explanation why the build works locally on my machine. Probably differnt LaTeX settings... I'll try replacing it with the HTML entity |
You can simply declare ® in doc/markdownlinkconverter/elektraSpecialCharacters.sty, I think this is the better solution. |
Seems like it didn't help |
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.
@kodebach thank you so much for this exceptional work! Thanks as well for fixing all the little problems unrelated to the main topic of this PR. I can't imagine how painful rebasing was, it took me three hours just to scroll throught the changes.
Most importantly:
I think there is an error with clear_bit/test_bit in src/libs/elektra/keyname.c
.
All other comments are just suggestions, so feel free to ignore the rest.
Additionally, can these empty files be removed:
src/bindings/swig/python2/tests/testpy2_kdb.py
doc/todo/PROPOSALS
?
} | ||
|
||
// move Key unescaped name | ||
if (curMeta->ukey) |
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 ukey always allocated and freed with the key name? Or would we actually need a third mmap flag for the ukey?
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, ukey
and key
should be allocated and freed together. I even made sure that a Key
is not modified by e.g. keySetName
unless the operation will be successful (apart from malloc
failures).
Co-authored-by: Mihael Pranjić <mpranj@limun.org>
I'm amazed you did it that quickly... The |
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.
Excellent work! Again, a huge thank you to @kodebach for making this a reality. 🥇
Continuation of #3447 (commits squashed and rebased)
Implements #3102
Closes #3050
Closes #3084
Closes #2698
Closes #3082
Basics
These points need to be fulfilled for every PR:
(added as entry in
doc/news/_preparation_next_release.md
whichcontains
_(my name)_
)Please always add something to the release notes.
(first line should have
module: short statement
syntax)close #X
, are in the commit messages.If you have any troubles fulfilling these criteria, please write
about the trouble as comment in the PR. We will help you.
But we cannot accept PRs that do not fulfill the basics.
Checklist
Check relevant points but please do not remove entries.
For docu fixes, spell checking, and similar none of these points below
need to be checked.
(not in the PR description)
Review
Reviewers will usually check the following: