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

Capture changes to local environment #2

Closed
moodymudskipper opened this issue Sep 29, 2021 · 2 comments
Closed

Capture changes to local environment #2

moodymudskipper opened this issue Sep 29, 2021 · 2 comments

Comments

@moodymudskipper
Copy link
Owner

moodymudskipper commented Sep 29, 2021

Other side effects can wait but it's a valuable low hanging fruit.

We should backup the local environment into bkp0, run original code save env into bkp1, save value in val1, restore bkp0, run refactored code, compare env with bkp1 and value with val1.

No about the name I wonder if we shouldn't name this one refactor and our current refactor would be refactor_value,
refactor would go on to incorporate more control on side effects.

@moodymudskipper
Copy link
Owner Author

An issue is that refactored might not create unnecessary temp vars and it's a good thing so how do we deal with this ?
It's nice that our function Is a binary opt, but yet it seems we need parameters

We might touch the original code to drop variables, in fact our error might say "The refactored code didn't create variables : foo, bar. If it is desired you should add : rm(foo, bar) at the end of your original code", so it's easy to coy and paste it.

In fact if variables exist on both sides but with different values we might have this type of error too, since they might be temp vars.

@moodymudskipper
Copy link
Owner Author

Let's close this since we have the feature, #12 will implement the idea.

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

1 participant