-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
What if we could have multiple example files? #395
Comments
Humm.... I like that!
Certainly! Possible implementationAdd a
When testing, Travis could loop the folders inside
I believe that this will not be problematic. This will only work if the site excludes everything that has Do you know anything about that? I still don't know yet how to check for failing tests. Checking it now...
If the examples use packages already in Stack's cache this will probably not be a problem. |
This will be tricky because we have |
We will be OK: Evidence in two places:
https://github.com/exercism/x-api/blob/aa4869e999443e3736d12e77436ac195fccf7e6b/lib/xapi/implementation.rb#L8 file bundle ignores using the whole path (despite its name,
They have directories named |
I'm not sure we want to move every single exercise's example to this structure. The examples that would benefit are the ones that need a |
When reviewing #393 I realized I wish that we could test that multiple signatures would be accepted by the test suite. But of course we have to pick a certain signature in our example file... or do we?
What about a crazy idea - what if we supported having multiple example files?
This is already supported on x-api - any file that has example in its name will be excluded, so we could have
Example2.hs
,Example3.hs
, etc.Then we would have to make our
.travis.yml
support it in a reasonable way.The idea is that Travis CI would test each example file individually (separately from the other examples) and makes sure that the test suite passes for each.
Potential use cases I can think of:
anagram
test suite can accept multiple signatures.accumulate
, we have an inefficient example noted at https://github.com/exercism/xhaskell/blob/master/exercises/accumulate/src/Example.hs#L15 and we say that it should fail the test suite. But this was never automatically verified and indeed for the longest time that example did not even compile until accumulate: fix inefficient example #209However, I hope that this doesn't make our tests take too long to run.
Is this idea worth it? Should I try it out to see what happens?
The text was updated successfully, but these errors were encountered: