boilr icon indicating copy to clipboard operation
boilr copied to clipboard

non deterministic template saving

Open Aluriak opened this issue 9 years ago • 4 comments

It seems that my boilr template save . python -f is not deterministic: follows a terminal session. I don't change any files during the session.

lucas@host:~/boilr-python-template➤ alias m='~/bin/boilr template save . python -f'
lucas@host:~/boilr-python-template➤ m
[✘] validate: template: LICENSE:1:6: executing "LICENSE" at <eq License "Apache S...>: error calling eq: incompatible types for comparison
lucas@host:~/boilr-python-template➤ m
[✔] Successfully saved the template python
lucas@host:~/boilr-python-template➤ m
[✘] validate: template: LICENSE:1:6: executing "LICENSE" at <eq License "Apache S...>: error calling eq: incompatible types for comparison
lucas@host:~/boilr-python-template➤ m
[✔] Successfully saved the template python
lucas@host:~/boilr-python-template➤ m
[✘] validate: template: LICENSE:1:6: executing "LICENSE" at <eq License "Apache S...>: error calling eq: incompatible types for comparison
lucas@host:~/boilr-python-template➤ m
[✘] validate: template: LICENSE:1:6: executing "LICENSE" at <eq License "Apache S...>: error calling eq: incompatible types for comparison
lucas@host:~/boilr-python-template➤ m
[✔] Successfully saved the template python

The error here is raised on this line, and should not (i think) appear while License is defined as string.

What am i missing ?

Aluriak avatar Aug 22 '16 22:08 Aluriak

@Aluriak can you reproduce it with the boilr-license template listed here?

Also feel free to add your own template to the wiki (it's editable to public).

tmrts avatar Aug 22 '16 22:08 tmrts

No, i can't:

lucas@host➤ git clone https://github.com/tmrts/boilr-license
# ...
lucas@host➤ cd boilr-license && ls
project.json  README.md  template
lucas@host/boilr-license➤ alias m='~/bin/boilr template save . python -f'
lucas@host/boilr-license➤ m
[✔] Successfully saved the template python
lucas@host/boilr-license➤ m
[✔] Successfully saved the template python
lucas@host/boilr-license➤ m
[✔] Successfully saved the template python
lucas@host/boilr-license➤ m
[✔] Successfully saved the template python
# ... ten more repeated lines

I will eventually try to reduce my template to a minimal maybe-working code.

Can you reproduce the problem with my template ?

I will add my template to the wiki once it will be good to me.

Aluriak avatar Aug 22 '16 22:08 Aluriak

I'm putting a reference to your template that causes this behavior in boilr, so that its not lost when you minimize the template (Aluriak/boilr-python@74a3984492a949c442eb00a9d9418fefb61a207c)

I'm about to turn off for the night. But, I'll examine the template as soon as I can and see where the problematic behavior is coming from :+1:

tmrts avatar Aug 22 '16 22:08 tmrts

I narrowed down the cause to the text/template library, but I'm not going to focus on this specifically, due to not enough information and due to the fact that there is an ongoing overhaul for the boilr templating system.

Feel free to comment if you encounter this issue elsewhere or if you've located the cause

tmrts avatar Feb 27 '17 10:02 tmrts