Client should not overwrite exercise folders it does not "own"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with the exercism download --exercise=pangram --track=javascript flow and reproduce the case where an existing folder lacks .exercism. Trace how the client decides whether to overwrite files, then determine the expected behavior for unowned folders and any explicit force option. Done means an unowned solution is preserved while owned or newly created exercise folders still work as intended.
Written by the indexing model from the issue text.
Description
Ref: https://exercism-team.slack.com/archives/CARRG4MNC/p1565821395212500
What I did / How to reproduce
I wanted to complete Pangram (on the mentored track) but I hadn't progressed that far yet in JS mentored mode. So I:
- downloaded a students Pangram exercise
- copied the files into my
~/Exercism/javascript/pangram - removed their solution (so I could solve it)
- removed the .exercism folder (removed the association with the student)
Later when the pangram opened up to me I:
exercism download --exercise=pangram --track=javascript- the client proceeded to delete my completed
pangram.js - and replace it with the empty template from the exercise
What I was expecting to happen:
- The .exercism metadata to be created and my already solved solution to be IGNORED and left in place.
What we've discussed on the Slack:
- Perhaps if Exercism sees a folder that does not belong to it (has no .exercism file) it raises a hard error and refuses to touch the folder, requiring manual intervention.
- Someone suggested a
--forceoption to tell the client to be forceful and proceed regardless
Then it would follow that the two cases that the Exercism client can muck with your filesystem:
- The exercise folder does not already exist
- The exercise folder does exist, but has an .exercism directory flagging it as "owned" by Exercism.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 363
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from exercism/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Fetch next exercise Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100