Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

RuntimeError: can't find var: print-nested #14

Open
tdryer opened this issue Jan 24, 2021 · 1 comment
Open

RuntimeError: can't find var: print-nested #14

tdryer opened this issue Jan 24, 2021 · 1 comment

Comments

@tdryer
Copy link

tdryer commented Jan 24, 2021

deadwiki fails to render the index of my notes directory with the error:

RuntimeError: can't find var: print-nested
html/index.hat: line 1, col 1

I get the same error with this minimal example:

bug
├── a
│   └── b
│       └── c.md
└── d
    └── e.md
mkdir -p bug/a/b
touch bug/a/b/c.md
mkdir -p bug/d
touch bug/d/e.md
tdryer added a commit to tdryer/hatter that referenced this issue Jan 27, 2021
1. When `Env::eval` handles a `Stmt:Call`, it pushes two scopes, but
only pops one of them. This manifested as a `can't find var` [issue in
deadwiki][1] when the "leaked" scope is cleared by `Eval::eval_for`.

2. When `Stmt::If` is evaluated, a scope is pushed but not popped when
the block contains a return statement. This manifested in the tests
after fixing the first issue.

[1]: xvxx/deadwiki#14
tdryer added a commit to tdryer/hatter that referenced this issue Jan 27, 2021
1. When `Stmt:Call` is evaluated, two scopes are pushed, but only one is
popped. This manifested as a `can't find var` [issue in deadwiki][1]
when the "leaked" scope is cleared by `Eval::eval_for`.

2. When `Stmt::If` is evaluated, a scope is pushed but not popped when
the block contains a return statement. This manifested in the tests
after fixing the first issue.

[1]: xvxx/deadwiki#14
@mjf
Copy link

mjf commented Feb 24, 2021

Same issue for me...

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

No branches or pull requests

2 participants