-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Display an easy-to-notice warning when code contains time.Now()
that the values won't be as expected
#189
Comments
@mikeschinkel how do you see that to be implemented? |
@mikeschinkel thank you for a report. I'll consider to add some kind of similar notification. Btw currently I'm planning to add yaegi-based runtime so sandbox can work fully offline. For now, I can recommend to use WebAssembly environment but it might have some I/O limitations (filesystem, networking). |
Thank you for considering.
Thank you. However I did not offer this suggestion for myself, because now that I have run into the problem I now know how to avoid it and so I will just do my learning related to the I suggested the change for the benefit of people in the future who come to goplay.tools who have no idea of the limitation, and when things don't work as expected they assume their code is the problem, not the platform. And for that reason, it would never occur to them that they would need to open up the settings, click the environment tab and switch to WebAssembly for Said another way, I made the suggestion so that goplay.tools might become more consistent with the principle of least surprise when someone who was trying to learn how to format time values uses goplay.tools in conjunction with As a complete aside, I notice you are from Lviv, Ukraine. How are things going for you, your family and your community given the war of Russian aggression? My heart goes out to your country people and I hope for your collective benefit that there is a resolution to the war soon than later. |
@mikeschinkel I propose to show this warning as a warning in code editor. It should mark all points where What do you think? |
Perfect! |
Will be shipped in a next release. |
Since
time.Now()
will not be fixed to work as expected (see #104, #188), please consider adding an easy-to-notice warning that the code will not operate as expected?That would keep developers from spending a lot of time trying to figure out what the hell is wrong with their code only to realize that the problem is not necessarily their code but in-fact a known-bug in how to platform diverges from expectation.
And it would be yet another benefit to using goplay.tools vs. golang.org/play.
The text was updated successfully, but these errors were encountered: