-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature: Add --probSpecsDir
option
#65
Merged
ErikSchierboom
merged 4 commits into
exercism:master
from
ee7:feature-add-probSpecsDir-option
Oct 23, 2020
Merged
Feature: Add --probSpecsDir
option
#65
ErikSchierboom
merged 4 commits into
exercism:master
from
ee7:feature-add-probSpecsDir-option
Oct 23, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ee7
force-pushed
the
feature-add-probSpecsDir-option
branch
2 times, most recently
from
October 22, 2020 12:59
6cb97e5
to
2833c2b
Compare
This was referenced Oct 22, 2020
ee7
force-pushed
the
feature-add-probSpecsDir-option
branch
from
October 23, 2020 09:16
2833c2b
to
1de7059
Compare
ErikSchierboom
approved these changes
Oct 23, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments! Excellent work.
ee7
force-pushed
the
feature-add-probSpecsDir-option
branch
2 times, most recently
from
October 23, 2020 11:51
ec650a9
to
0aafa75
Compare
ErikSchierboom
approved these changes
Oct 23, 2020
We want to add support for specifying the path of a `problem-specifications` directory to use. However, the previous workaround for `grains` was implemented by overwriting the `canonical-data.json` file for `grains`. It's better if we don't alter a user's non-temporary `problem-specifications` repo, so this commit changes the `grains` workaround to happen at the time of parsing instead.
The user can now tell the program to use an existing `problem-specifications` directory, in which case the program does a `fetch` rather than making a temporary shallow clone. This is one of the biggest possible speed optimisations, given that the program running time in non-interactive mode is limited by the time taken to establish an up-to-date `problem-specifications`directory. However, in the future we could add an `--offline` option (or similar). This commit also makes it easier to add tests. Decisions: - Show an error if the given `problem-specifications` working directory is not clean, rather than asking the user or stashing changes. - Try to be strict about the user's `problem-specifications` directory, and do not silently `checkout` or `merge`, at least for now. - Don't assume the user has a remote named 'upstream'. - Allow the given `problem-specifications` repo to be a shallow clone: don't check that it's actually a `problem-specifications` repo by requiring it to contain some specified SHA-1. Closes: exercism#47 Co-authored-by: Erik Schierboom <[email protected]>
This commit adds our first tests. Let's start with some basic checking of `findProbSpecsExercises`, which is the main exported proc in `src/probspecs.nim`. We check the default behaviour of creating a temporary shallow clone, as well as the behaviour of the `--probSpecsDir` option in the simplest case.
ee7
force-pushed
the
feature-add-probSpecsDir-option
branch
from
October 23, 2020 12:21
0aafa75
to
aa15896
Compare
ee7
added a commit
to ee7/exercism-configlet
that referenced
this pull request
Oct 23, 2020
This should have been included in 6c603ae (exercism#65).
ee7
added a commit
to ee7/exercism-configlet
that referenced
this pull request
Jan 21, 2021
This should have been included in be7404b (exercism#65).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See the commit messages for more information - the commits are atomic.
Some things like the
git
error messages could probably be cleaned up a bit, and there's some obvious tests to add, but it should be reasonably robust. I think the implementation here is quite strict. Let me know if I missed any edge cases.WIP:
checkout
ormerge
, even if the working directory is clean.Closes: #47