profile
viewpoint
Kenfe-Mickaël Laventure mlaventure Verkada San Francisco, California Come work with me at Verkada ! Contact recruiting@verkada.com

containerd/go-runc 61

runc bindings for Go

containerd/fifo 56

fifo pkg for Go

crosbymichael/docker 6

Docker - the open-source application container engine

mlaventure/bash-config 0

my bash configuration

mlaventure/cgroups 0

cgroups package for Go

mlaventure/cli 0

The Docker CLI

mlaventure/cobra 0

A Commander for modern Go CLI interactions

mlaventure/console 0

Golang console package

mlaventure/containerd 0

Standalone Container Daemon

mlaventure/direnv 0

Unclutter your .profile

startedbodil/smartstring

started time in a day

starteddskkato/rjo

started time in 10 days

startedfoxlet/macOS-Simple-KVM

started time in 20 days

startedmarcobambini/gravity

started time in a month

startedgpakosz/.tmux

started time in a month

issue commentflosch/pongo2

ifchanged panic if there's no else

Got it: It's when within a double loop:

{% for comment in complex.comments2 %}
    {% for comment2 in complex.comments2 %}
        {% ifchanged comment2.author.validated %}
              // This will panic
        {% endifchanged %}
    {% endfor %}
{% endfor %}
mlaventure

comment created time in a month

issue commentflosch/pongo2

ifchanged panic if there's no else

Can you provide a minimal template which panics? This helps me debugging. Thanks!

I figured, I've been trying to find one before opening a PR, I couldn't so I opened this issue instead. We'll keep trying, I may have had an idea of the difference between my current template and the one in the tests

mlaventure

comment created time in a month

issue openedflosch/pongo2

ifchanged panic if there's no else

I am not sure what's special about my template code, but I get this panic when trying to use ifchanged without an else close.

I fixed it locally by check if node.elseWrapper != nil on tags_ifchanged.go:59 but I didn't dig into the details to figure out why it can happens when the similar code in the template_tests directory seems to do just fine.

This was on go version go1.14 linux/amd64, the relevant panic part was:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5253f6]

goroutine 1 [running]:
github.com/flosch/pongo2.(*NodeWrapper).Execute(0x0, 0xc0003a9980, 0x72da60, 0xc0003a98
90, 0x0)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/nodes_wrapper.go:9 +0x26
github.com/flosch/pongo2.(*tagIfchangedNode).Execute(0xc0000130e0, 0xc0003a9980, 0x72da
60, 0xc0003a9890, 0x0)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/tags_ifchanged.go:61 +0x404
github.com/flosch/pongo2.(*NodeWrapper).Execute(0xc0003a8ff0, 0xc0003a9980, 0x72da60, 0
xc0003a9890, 0xc0003a1f08)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/nodes_wrapper.go:10 +0x84
github.com/flosch/pongo2.(*tagForNode).Execute.func1(0x1, 0x36, 0xc000361c20, 0x0, 0x6a
a801)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/tags_for.go:67 +0x125
github.com/flosch/pongo2.(*Value).IterateOrder(0xc000361be0, 0xc00017f7a0, 0xc00017f770
, 0x0)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/value.go:436 +0x33c
github.com/flosch/pongo2.(*tagForNode).Execute(0xc0003d21e0, 0xc0003a9920, 0x72da60, 0x
c0003a9890, 0x0)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/tags_for.go:47 +0x276
github.com/flosch/pongo2.(*nodeDocument).Execute(0xc0003617c0, 0xc0003a9920, 0x72da60, 
0xc0003a9890, 0x0)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/nodes.go:10 +0x83
github.com/flosch/pongo2.(*Template).execute(0xc00012c3f0, 0xc0003a8c90, 0x72da60, 0xc0
003a9890, 0x8f8760, 0x7f30808f7108)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/template.go:173 +0x7b
github.com/flosch/pongo2.(*Template).newBufferAndExecute(0xc00012c3f0, 0xc0003a8c90, 0x
2, 0x6902a0, 0x1)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/template.go:188 +0xef
github.com/flosch/pongo2.(*Template).ExecuteWriter(0xc00012c3f0, 0xc0003a8c90, 0x72c5c0
, 0xc0003a8e10, 0x0, 0x0)
        /home/mlaventure/go/pkg/mod/github.com/flosch/pongo2@v0.0.0-20200529170236-5aba
cdfa4915/template.go:198 +0x39

created time in a month

fork mlaventure/pongo2

Django-syntax like template-engine for Go

https://www.florian-schlachter.de/?tag=pongo2

fork in a month

push eventmlaventure/bash-config

Kenfe-Mickael Laventure

commit sha 64a0c16eef3b0a41bec5359bc56a0304d6c33fa5

Add support for emacs-vterm Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

view details

Kenfe-Mickael Laventure

commit sha 344d7032946ce83599f1562356c168a2978708ec

Remove unicode character, they confuse bash cursor pos calculations Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

view details

Kenfe-Mickael Laventure

commit sha cf39cc06d354ac59a24cff08f7a501d40b135083

Update to support doom-emacs Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

view details

Kenfe-Mickael Laventure

commit sha 0ac78cc56bd9a1ba7382abec6edc094bd632b41c

Up scaling factor (all screens are 4K now) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

view details

push time in a month

startedsamsarahq/thunder

started time in 2 months

startedpilebones/go-udev

started time in 2 months

push eventmlaventure/emacs-config

Kenfe-Mickael Laventure

commit sha 430509d824e1c55c34f850c9d704da25d7253d9a

doom-emacs tweaking Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

view details

push time in 2 months

push eventmlaventure/emacs-config

Kenfe-Mickael Laventure

commit sha ce14f64c8cc2159c7434ecd7c11d0b8bc744244f

Moving to doom-emacs Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

view details

push time in 2 months

fork mlaventure/sysstat

Performance monitoring tools for Linux

http://sebastien.godard.pagesperso-orange.fr/

fork in 3 months

more