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
[Bug] Local files are overwritten when updating exercises #5114
Comments
This doesn't show any file beein overwritten. The download command will always make sure, that all files which it is aware of, have the same state locally and remote. So if you made changes locally, that you did not submit, those will be lost when using the download command. This is independant from using the "update" functionality on the website. |
My point is: There's no longer an "update" functionality on the website (or not that I'm aware of). Before, there's another button that appeared when I clicked "Update exercise to latest version". It's no longer the case now. |
After you clicked "update", your server side version of the tests get bumped to whatever is current on git then. You can use The "update" button only appears if there are updates available to you. I'm not sure what you expect otherwise. |
And when I "exercism download" those files, if my local solution file is different from the server side, it will be overwritten by the server solution, is that correct? As far as I understand, if I submit a solution named "foo.py", this file shouldn't be downloaded when I update the exercise (I only want to update README and the test suite), which doesn't seem to be the case here. |
As I said, if your local version of the file of the server side version, then This is as expected. |
It is not though replaced by stubs or similar that were available upstream. |
I have experienced this behavior myself with great dismay: I used a local copy to keep different variations of a solution for an exercise, but hadn't uploaded a new iteration, since I had begun to use the local copy as mentoring notes. Unfortunately updating the exercise wiped the copies, which I eventually have recreated over time. Since I didn't put my exercism directory into git control, I now have to remember that if I ever want to update an exercise, I should make sure to manually back up my local copy. A safer behavior of the |
@NobbZ Thank you. That's clear to me. I thought it was different. My memory should have failed me on this. So, to sum up, if we've already solved an exercise, "download" won't give us the default stub but will give us the last file we submitted, even if it is different from the local file. I have no more questions, please feel free to close the issue if you think it's fine. |
As I highlighted, I think overwriting a file without question is possibly not the best choice. |
Hello 👋 With the launch of Exercism v3, we are closing all issues in this repository to help give us a clean slate to detect new problems. If this issue is still relevant to Exercism v3 (e.g. it's a feature that we haven't implemented in v3, or a bug that still exists), please reopen it and we will review it and post an update on it as soon as we get chance. Thanks for helping make Exercism better, and we hope you enjoy v3 🙂 |
As the title indicates, all of my local files (including the solution files) are totally overwritten when I update an exercise. I already tested this on Windows 10 and Ubuntu and received the same behavior.
I think the reason is that now the updating and downloading commands are merged into one. I remember that they are separated before.
Before clicking updating:
After clicking updating:
Can anyone reproduce this bug? Thank you very much.
The text was updated successfully, but these errors were encountered: