Skip to content
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

datetime1.mcl example fails #472

Closed
thkoch2001 opened this issue Feb 24, 2019 · 1 comment
Closed

datetime1.mcl example fails #472

thkoch2001 opened this issue Feb 24, 2019 · 1 comment

Comments

@thkoch2001
Copy link

I run

mgmt run --tmp-prefix lang --lang examples/lang/datetime1.mcl

and get a different panic each time I run it:

panic: function name example.errorbool is not a valid identifier
panic: function name example.answer is not a valid identifier
panic: function name example.int2str is not a valid identifier
panic: function name sys.defaultenv is not a valid identifier
panic: function name math.pow is not a valid identifier
panic: function name sys.hasenv is not a valid identifier

The following stacktrace always starts with:

goroutine 248 [running]:
text/template.addValueFuncs(0xc42089d080, 0xc420451a50)
        /usr/lib/golang/src/text/template/funcs.go:68 +0x49a
text/template.(*Template).Funcs(0xc4203c5580, 0xc420029a50, 0x0)
        /usr/lib/golang/src/text/template/template.go:171 +0xa3

But the preceding log lines differ slightly, apparently only in ordering. One example is:

18:27:06 main.go:492: gapi: lang: funcs: func `call:datetime.now()` started
18:27:06 main.go:492: gapi: lang: funcs: func `call:datetime.now()` changed
18:27:06 main.go:492: gapi: lang: funcs: func `var(d)` started
18:27:06 main.go:492: gapi: lang: funcs: func `var(d)` changed
18:27:06 main.go:492: gapi: lang: funcs: func `call:template(str(Hello! It is now: {{ datetime_print . }}
), var(d))` stopped

I run mgmt from the debian package 0.17. The file in /tmp does not get written. The error happens immediately after startup.

@purpleidea
Copy link
Owner

@thkoch2001 This is actually already fixed in git master in f716a3a.

Sorry about that. I'll be rolling a new release soon.

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

No branches or pull requests

2 participants