Almenon / Almenon/AREPL-vscode

#$save macro does not work in many cases

Open
#53 2 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
301
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Currently I use deepcopy to save the state: https://docs.python.org/3.6/library/copy.html#copy.deepcopy

This means the types must be serializable by deepcopy, which unfortunately has some major limitations:

* Deepcopy cannot handle the following types:
> "This module does not copy types like module, method, stack trace, stack frame, file, socket, window, array, or any similar types"

* Imports are not saved (although you can still use imports in the saved section, the import will just happen twice)

* Conditional imports and imports in functions may not work

* File I/O does not work (TextIOWrapper is not serializable)

Please comment below if you run into any issues with #$save

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.