Skip to content
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

Script reverts to old version #1728

Closed
braxtondb opened this issue Jan 7, 2021 · 3 comments
Closed

Script reverts to old version #1728

braxtondb opened this issue Jan 7, 2021 · 3 comments

Comments

@braxtondb
Copy link

Found a bug.

  • Web browser and version: Chrome, 87.0.4280.88 (Official Build) (64-bit) (cohort: Stable)
  • Operating System: Windows 10
  • Here's what I did, but I don't know if it is all required:
  1. Go to one of your scripts
  2. Make some changes - I coded for a good hour or two
  3. Save profusely while editing
  4. When finished making changes and you are satisfied, it shows as saved and you should be good to close out of the tab -- I did not. Just switch to another tab for a while
  5. After "a while" has passed, perhaps a couple of hours: Sometimes when you come back to your script it will, for some reason, display an older version of the script. In my case, it went back to the version I started with when I started editing that session. This has happened before, and normally you can fix it by refreshing the page without making any changes. Making changes and saving, however, will overwrite the entire script with the old version of it. Unfortunately, I had no clue it was reverted in this case, and I just popped in to make some notes only to find out that I now have to reprogram my entire game.

Aside from somehow fixing this issue, I think it would be nice if p5js had some kind of version history implemented, which could also help solve it. Even storing just the last 2-3 versions would be helpful.

@welcome
Copy link

welcome bot commented Jan 7, 2021

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@catarak
Copy link
Member

catarak commented Jan 20, 2021

Hey @Novarender, thanks for reporting and I'm super sorry that happened! That sounds really, really frustrating. I believe the solution here is implementing adding changes to sketches using CRDT's (see recommendation here), as opposed to simply replacing the entire contents of the JS/CSS/HTML/etc. file. This would also help with potentially saving multiple versions of sketches!

@catarak
Copy link
Member

catarak commented Feb 12, 2021

Closing into #1635 / #1759

@catarak catarak closed this as completed Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants