Question: What is the recommended way to get an updated result from a call to with(MyPackage) without having to call restart?

I have a workflow in which I edit files from a package I develop. These are usually mpl files, and I edit them in an editor (VS Code).

Then I have a worksheet called open in Maple that has two commands:



and another worksheet which is the actual worksheet I am working on, which starts with restart: with(MyPackage): and then contains calls to procedures from the package.

With this workflow, I make a change in the editor, execute and then go to my actual worksheet and restart and then use with(MyPackage), and the updates are available.

This works.

However, in I may have a bunch of data that I don't want to wipe out with a restart. 

On the other hand, if I don't restart, a new call to with(MyPackage) does not update the import of the package (because it has already been imported. 

Is there an idiomatic or preferred way to accomplish reimporting the package without having to call restart?

PS I don't remember now the exact reason why I don't have the call to read the file in but it had something to do with this issue of not getting the package updated correctly.

Please Wait...