{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/nunjucks/issues/423","labels_url":"https://api.github.com/repos/mozilla/nunjucks/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/nunjucks/issues/423/comments","events_url":"https://api.github.com/repos/mozilla/nunjucks/issues/423/events","html_url":"https://github.com/mozilla/nunjucks/pull/423","id":72036218,"number":423,"title":"export all vars created with `set` even in child templates (fixes #410)","user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.githubusercontent.com/u/17031?v=3","gravatar_id":"","url":"https://api.github.com/users/jlongster","html_url":"https://github.com/jlongster","followers_url":"https://api.github.com/users/jlongster/followers","following_url":"https://api.github.com/users/jlongster/following{/other_user}","gists_url":"https://api.github.com/users/jlongster/gists{/gist_id}","starred_url":"https://api.github.com/users/jlongster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlongster/subscriptions","organizations_url":"https://api.github.com/users/jlongster/orgs","repos_url":"https://api.github.com/users/jlongster/repos","events_url":"https://api.github.com/users/jlongster/events{/privacy}","received_events_url":"https://api.github.com/users/jlongster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-30T01:49:02Z","updated_at":"2015-04-30T18:30:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/nunjucks/pulls/423","html_url":"https://github.com/mozilla/nunjucks/pull/423","diff_url":"https://github.com/mozilla/nunjucks/pull/423.diff","patch_url":"https://github.com/mozilla/nunjucks/pull/423.patch"},"body":"@garygreen @carljm does this look right? this will fix https://github.com/mozilla/nunjucks/issues/410\r\n\r\nbasically we only exported vars created by `set` if the template didn't have a parent scope. This worked in templates that created macros because by default (I think it's default) they don't have access to the scope of the template including it.\r\n\r\nHowever, when using `with context`, there is a parent scope, so variables weren't being exported.\r\n\r\nI had to mark certain frames as \"top-level\" because we don't want to export variables created within a frame that's not the top-level (like inside a `for` loop)"},"comment":{"url":"https://api.github.com/repos/mozilla/nunjucks/issues/comments/97909942","html_url":"https://github.com/mozilla/nunjucks/pull/423#issuecomment-97909942","issue_url":"https://api.github.com/repos/mozilla/nunjucks/issues/423","id":97909942,"user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.githubusercontent.com/u/17031?v=3","gravatar_id":"","url":"https://api.github.com/users/jlongster","html_url":"https://github.com/jlongster","followers_url":"https://api.github.com/users/jlongster/followers","following_url":"https://api.github.com/users/jlongster/following{/other_user}","gists_url":"https://api.github.com/users/jlongster/gists{/gist_id}","starred_url":"https://api.github.com/users/jlongster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlongster/subscriptions","organizations_url":"https://api.github.com/users/jlongster/orgs","repos_url":"https://api.github.com/users/jlongster/repos","events_url":"https://api.github.com/users/jlongster/events{/privacy}","received_events_url":"https://api.github.com/users/jlongster/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T18:30:08Z","updated_at":"2015-04-30T18:30:08Z","body":"I'll wait until tomorrow to merge it in, in case you have time tomorrow. I'm going to ask everyone to run master soon anyway because there's lots of changes"}}