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

bob: ensure generator is up-to-date #624

Closed
robphoenix opened this issue Apr 18, 2017 · 4 comments
Closed

bob: ensure generator is up-to-date #624

robphoenix opened this issue Apr 18, 2017 · 4 comments

Comments

@robphoenix
Copy link
Contributor

Parent issue: #604

Because of recent changes to make all the canonical-data.json files conform to
a common scheme (exercism/problem-specifications#625), it might be
the case that our current generator no longer runs.

For this exercise we need to make sure the current generator runs, and if it
doesn't then we need to update it.

In addition, the three lines at the top of the file:

// Source: {{.Ori}}
{{if .Commit}}// Commit: {{.Commit}}
{{end}}

can simply be replaced with {{.Header}}, which has the effect of:

  • Deprecating the Ori field, which is confusingly named
  • Showing the x-common version in the test file
  • Reducing duplicate code
@robphoenix robphoenix changed the title bob: ensure generator is up to date bob: ensure generator is up-to-date Apr 18, 2017
@robphoenix robphoenix added #604 confirm generators are up-to-date good first issue pinned Shown at the top of the issue page and removed pinned Shown at the top of the issue page labels Apr 18, 2017
@leenipper
Copy link
Contributor

For the bob exercise, this x-common commit: exercism/problem-specifications@45ff2e0 removed two test cases which had umlauts in the test data. There wasn't much justification, just that non-Latin characters were removed.

I was debating whether to manually insert those test cases back with lines in the template after the canonical-data.json generated cases. I think the umlauts fit well with Go supporting UTF-8. Other opinions on this ?

@petertseng
Copy link
Member

The justification is exercism/problem-specifications#441

I don't really care, but I do note I don't think they add much value, in the sense of - I don't think we are likely to see implementations that would fail the umlaut test. I wonder if I am proven wrong by some data somewhere.

@robphoenix
Copy link
Contributor Author

robphoenix commented Apr 27, 2017

Personally I agree with the discussion in exercism/problem-specifications#428 and would prefer to stick with the canonical-data. I worry also that this might undermine the benefit of the generators by creating test data that has specific manual upkeep, rather than relying on the canonical-data.json.
It would be good to see some exercises deal with non-ASCII specifically.
for reference: #195 (comment)

@leenipper
Copy link
Contributor

OK, very good. Using canonical-data.json is best.

leenipper added a commit to leenipper/xgo that referenced this issue Apr 27, 2017
Resolves exercism#624

Use .Header in template.
Test cases changed using latest canonical-data.json,
so bump testVersion/targetTestVersion in the test program, stub,
and example solution from 2 to 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants