-
Notifications
You must be signed in to change notification settings - Fork 378
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
Tern server.reset isn't deleting files #60
Comments
This is the intended behavior. |
The primary use case I am looking at is switching projects; most likely data does not carry from project to project. So, I am manually setting server.files = [] when switching projects; I am also calling reset as that seemed like a natural call to make. Perhaps reset and clearing all files (along with whatever else you might want to clean up) can be put in a function? Maybe clear(), clearAll()? I don't your preference. I am not big into making pull request for such small items, but if you would like I can add a clear function and make a pull request for ya. Or if you have a better approach, I would really like to hear about it. |
Create a new server for each project. I don't think there's anything added by being able to re-purpose an existing server object. |
Alright, simple enough. I am always skeptical about creating new objects that are called "server", which is why I didn't do it before. But if you are suggesting it, then it must be safe to do :-) Thanks! |
Yes, definitely safe. This is not a singleton, and there's no global data involved. |
Is server.reset supposed to delete all the files? If it is supposed to, then we have a bug.
The text was updated successfully, but these errors were encountered: