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
isso: module & init at 0.9.10 WIP #13587
Conversation
By analyzing the blame information on this pull request, we identified @edolstra, @joachifm and @offlinehacker to be potential reviewers |
Feel free to add |
Cc: @edolstra because of the addition of a new function in |
lib/attrsets.nix
Outdated
@@ -43,6 +44,16 @@ rec { | |||
[ { name = head attrPath; value = setAttrByPath (tail attrPath) value; } ]; | |||
|
|||
|
|||
/* Map function f over the value of the attribute described by attrPath. | |||
For instance, mapAttrByPath [ "x" "y" ] (a: a+1) { x.y = 1; } returns | |||
{ x.y = 2; }. If the path doesn’t exist the default value is used. */ |
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's not clear to be from this description what is being mapped. That suggests that multiple values are updated, but the example suggests only the specified attribute (x.y) is updated. And what is the recursiveUpdate
for?
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.
Changed the implementation in the newest version, according to aszlig’s input.
Do you think we should rename that function? I can’t think of another word but map. But I will change the docstring to start with “Apply function …”.
3a8ffbf
to
91b377e
Compare
and implement updateAttrByPath with it. The previous version with recursiveUpdate went over the whole attrset, even though only one element needs to be touched. Thanks @aszlig for the input and the initial setAttrInSetByPath implementation, which was refined later. Adds tests for both functions.
I renamed the functions to I also added tests and fixed errors with certain inputs for the set function (gah, dynamically typed languages ;) ). |
i would like to use isso on nixos, so i tested this PR: it got installed, configuration got created and the service started, but with errors.
that might be related to #1248 but it also don't work with a workaround. |
@Profpatsch yes. (only some Umlauts are broken in issos interface) After a restart are the comments gone, also every second restart fails.
|
The Umlauts are fine when i use it in Nikola, maybe an encoding problem in your simple example website. Your config works also without the container and then the comments are persistent and every restart works! The difference of our configs is: your working config:
my try:
the error was the missing please change that in the example of the module: my whole config: davidak/nixos-config@c8b6443 |
The example page doesn’t specify an encoding, as you can see in the code
Hm, interesting. I used |
have you tested it? then resolve the merge conflicts and get it merged. next step would be to use a WSGI Server like gunicorn for production use. the developer's choice is uWSGI but the debian package uses gunicorn. it is simpler to configure and has also a good performance. should be good most users. https://posativ.org/isso/docs/extras/deployment/ |
All in due time. It’s a work in progress, after all. Except if you’d like to help me. There’s a few tests to be written. :) |
@Profpatsch How could i help? I haven't written module tests by now and don't know what you have in mind. So it might be more effective when you do that. Do you think you find some time in the near future? |
I haven’t either. :)
This Saturday/Sunday at the earliest. The merge conflicts are only because the gid/pid needs to be adjusted btw. |
|
I guess this has stalled. |
Yeah, it’s pretty low on my priority list right now. |
@Profpatsch sadly i had also no time to look into this. i have planned to deploy my new website without comments first next month (what is tomorrow :)). so i can make progress and fix small things like that later. |
I actually planned on using isso as commenting server for audio files (soundcloud-like), but that’s a very far-off project right now. |
isso commenting server
not sure if the way I handle misaka 1&2 is the way to go @garbas
cc @aszlig (spacing. :) )