-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
Should we add x-common versions to our non-generated exercises? #669
Comments
Sounds helpful. We can add a script in xgo/bin which does a report on generator vs. canonical versions to get a summary. So, IIUC, the new comment will be located in the .meta/gen.go of each exercise, and the version x.y.z will agree with the x-common version that is shown in the cases_test.go which was "just generated" or previously generated. Correct ?
I am not quite getting the "superset" idea here. If the comment said "// x-common version: x.y.z + additional tests; see below", then it makes sense to me. Meaning that the original tests were from x-common x.y.z but more were added manually in different test case data. |
Yeah something like that! This is already happening for the generated exercises. This proposal just says I'll add them by hand to the non-generated exercises, until they get a generator.
Ah, yeah, that could be done. In my mind the purpose of marking the xgo-specific tests is just to make sure that when we create a generator that we consider whether we want to delete the test or make sure they're retained even after generation. If we'd rather wait to perform the check, I suppose I don't need to mark them. |
Oh, you must mean the x-common version comment in the generated cases_test.go.
Oh, in that case .meta/gen.go won't exist yet.
So, the added tests are placed such that re-generation retains both the canonical tests and the added ones. |
👍
I'd say to place them near the test cases in the
Yeah, if we decide we want to keep some of them. alternatives of course are to no longer have them (match x-common) or to get them accepted to x-common. |
Very good. Understand the approach now. |
For planning: The list of such unversioned exercises is:
|
I've decided it's not necessary to put these (#670, #671) in a student visible place. The goal of this was to tell us which exercises are most out of date and therefore would benefit the most from a generator. This can be achieved by simply reporting the information I found. Our up-to-date exercises:
All other exercises, taking into account what I found in #670 and #671:
|
Since the goal (how up-to-date are we?) is achieved, I can close this now. Feel free to continue commenting if you have extra information to about how up-to-date we are. |
Putting the x-common version in all of our generators gives us a benefit: We can easily detect when our tests go out of date, so we know when to rerun the generators.
Until we finish #605, we have non-generated exercises. Let's say #605 will take a few months to complete, and/or we decide that there are some exercises we don't want to generate (how to generate react???).
Would it help if we added an x-common version for all currently non-generated exercises? That would help us determine which non-generated exercises are out of date. That can help:
If the xgo tests are a superset of x-common for some version of x-common, there will be comment "// x-common version: x.y.z" just like in our generated files, and also note which tests are xgo-specific.
Otherwise, there will be the comment "// x-common version: none". The presence of the comment shows that it's been looked at but no suitable x-common version was found. (Or is it OK not to have the comment at all?)
If y'all think this is a good idea, I volunteer to do it.
The text was updated successfully, but these errors were encountered: