{"action":"created","issue":{"url":"https://api.github.com/repos/unclebob/fitnesse/issues/644","labels_url":"https://api.github.com/repos/unclebob/fitnesse/issues/644/labels{/name}","comments_url":"https://api.github.com/repos/unclebob/fitnesse/issues/644/comments","events_url":"https://api.github.com/repos/unclebob/fitnesse/issues/644/events","html_url":"https://github.com/unclebob/fitnesse/pull/644","id":58383778,"number":644,"title":"Expose table of symbols to TableTable fixtures","user":{"login":"jplambert","id":10744293,"avatar_url":"https://avatars.githubusercontent.com/u/10744293?v=3","gravatar_id":"","url":"https://api.github.com/users/jplambert","html_url":"https://github.com/jplambert","followers_url":"https://api.github.com/users/jplambert/followers","following_url":"https://api.github.com/users/jplambert/following{/other_user}","gists_url":"https://api.github.com/users/jplambert/gists{/gist_id}","starred_url":"https://api.github.com/users/jplambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jplambert/subscriptions","organizations_url":"https://api.github.com/users/jplambert/orgs","repos_url":"https://api.github.com/users/jplambert/repos","events_url":"https://api.github.com/users/jplambert/events{/privacy}","received_events_url":"https://api.github.com/users/jplambert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-20T17:26:10Z","updated_at":"2015-03-13T07:58:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/unclebob/fitnesse/pulls/644","html_url":"https://github.com/unclebob/fitnesse/pull/644","diff_url":"https://github.com/unclebob/fitnesse/pull/644.diff","patch_url":"https://github.com/unclebob/fitnesse/pull/644.patch"},"body":"TableTable fixtures can have access to the Slim execution context if they implement StatementExecutorConsumer. However this does not allow them to resolve symbols, making this an unsuitable approach. By adding 'getSymbol' on StatementExecutorInterface, this becomes possible.\r\n\r\nThis is to follow up issues such as FitNesse's issue #525 or RestFixture's issue 52 https://github.com/smartrics/RestFixture/issues/52"},"comment":{"url":"https://api.github.com/repos/unclebob/fitnesse/issues/comments/78856334","html_url":"https://github.com/unclebob/fitnesse/pull/644#issuecomment-78856334","issue_url":"https://api.github.com/repos/unclebob/fitnesse/issues/644","id":78856334,"user":{"login":"jplambert","id":10744293,"avatar_url":"https://avatars.githubusercontent.com/u/10744293?v=3","gravatar_id":"","url":"https://api.github.com/users/jplambert","html_url":"https://github.com/jplambert","followers_url":"https://api.github.com/users/jplambert/followers","following_url":"https://api.github.com/users/jplambert/following{/other_user}","gists_url":"https://api.github.com/users/jplambert/gists{/gist_id}","starred_url":"https://api.github.com/users/jplambert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jplambert/subscriptions","organizations_url":"https://api.github.com/users/jplambert/orgs","repos_url":"https://api.github.com/users/jplambert/repos","events_url":"https://api.github.com/users/jplambert/events{/privacy}","received_events_url":"https://api.github.com/users/jplambert/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T07:58:07Z","updated_at":"2015-03-13T07:58:07Z","body":"OK, I looked into the FitNesse acceptance suite and saw the FitNesse.SuiteAcceptanceTests.SuiteSlimTests.TableTableSuite.ChangeContextValue test.\r\n\r\nBy extending it that should be enough to show why this change is needed. Actually, it also shows that things are complex, and that although the change I propose will enable to improve things, it won't fix it all.\r\n\r\n\r\nI have updated the page with this:\r\n\r\n|import|\r\n|fitnesse.slim.test|\r\n\r\n!1 Make a table table define a new symbol and use this symbol in subsequent rows\r\n\r\n|script|test slim|\r\n|$X=|echo int|99|\r\n\r\n|table: Table Table Inc First Col |\r\n|$X|$Y=|\r\n|$Y|$Z=|\r\n\r\n|script|test slim|$Y|\r\n|check|return Constructor Arg|100|\r\n\r\n|script|test slim|$Z|\r\n|check|return Constructor Arg|101|\r\n\r\n!1 Make a table table use a symbol, assign into another one and use this symbol in subsequent rows\r\n\r\n|script|test slim|\r\n|$X=|echo int|99|\r\n|$Y=|echo int|44|\r\n\r\n|table: Table Table Inc First Col |\r\n|$X|$Y=|\r\n|$Y|$Z=|\r\n\r\n|script|test slim|$Z|\r\n|check|return Constructor Arg|101|\r\n\r\n!1 Make a table table use a symbol and assign back in the same symbol\r\n\r\n|script|test slim|\r\n|$X=|echo int|99|\r\n\r\n|table: Table Table Inc First Col |\r\n|$X|$X=|\r\n\r\n|script|test slim|$X|\r\n|check|return Constructor Arg|100|\r\n\r\n!1 Make a table table use a symbol and assign back in the same symbol twice, that is re-using the symbol in subsequent rows\r\n\r\n|script|test slim|\r\n|$X=|echo int|99|\r\n\r\n|table: Table Table Inc First Col |\r\n|$X|$X=|\r\n|$X|$X=|\r\n\r\n|script|test slim|$X|\r\n|check|return Constructor Arg|101|\r\n\r\n\r\n\r\nWhich give that:\r\n![symbols1](https://cloud.githubusercontent.com/assets/10744293/6634785/ac8b88dc-c95d-11e4-8bf3-0f6c3844c911.png)\r\n![symbols2](https://cloud.githubusercontent.com/assets/10744293/6634787/ad5bf38c-c95d-11e4-85f7-fa2c12b54031.png)\r\n\r\nWe see that:\r\n- Symbols not already defined before the execution of table table, are forwared as-is to the table table. The current TableTableIncFirstCol does not make any use of the API I propose and thus do not replace symbols, hence failing at parsing $Y as an integer.\r\n- Symbols already defined before the execution of the table table, gets replaced by FitNesse. As a result, it is not possible for a table table to update the value of a symbol twice: it won't even know that there was a symbol in the first place. So $Y will be used as its value before the table table, not the value assigned in the table table.\r\n- The current TableTableIncFirstCol does not actually assign symbols and let this duty to FitNesse. FitNesse makes this only for new symbols. As a result, assigning in a existing symbol is ignored. The value of $X is not incremented.\r\n\r\nWe could update TableTableIncFirstCol to handle symbols all by himself. However there would still be some issues with FitNesse replacing symbols greedily. Changing this last behavior, though, would impact existing table table implementors so I don't think we want to go that way...\r\n\r\nAny suggestion?\r\n"}}