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

Consider saving workflow when program starts #2077

Open
bruno-f-cruz opened this issue Dec 10, 2024 · 2 comments
Open

Consider saving workflow when program starts #2077

bruno-f-cruz opened this issue Dec 10, 2024 · 2 comments
Labels
proposal Request for a new feature

Comments

@bruno-f-cruz
Copy link
Contributor

It is my understanding that the editor can keep a cached state of the workflow that has not yet been serialized to disk. In cases where asserting the state of the software is important, e.g. asserting if the repository is dirty at start-up, this feature makes it difficult to know what is the state that run the experiment as the cached state is not serialized to disk. One way to go around this may be to "force" the workflow to save itself each time the program starts.

@glopesdev
Copy link
Member

Feedback from DCM:

  • Temp files instead of saving on run? Would this help?
  • Have a toggle button for "save on run"?
    • Save in global settings
  • It is possible to develop "buggy" custom extensions which will build, save, but not deserialize correctly from XML after save, is this a problem?

@PathogenDavid
Copy link
Member

  • Temp files instead of saving on run? Would this help?

I don't think this is especially helpful for Bruno's original stated use-case when this issue was made. IIRC he was embedding the hash of the workflow in logs so there was traceability as to which workflow was used for the experiment.

It might make sense for Bonsai to do this in the background as a method for auto-recovery though.

  • Have a toggle button for "save on run"?

If this is being envisioned as a button on the toolbar this sounds like extreme clutter to me. The behavior Bruno is describing is exactly what Visual Studio and VSCode do.

IIRC Visual Studio used to prompt you before saving (with a checkbox to remember the choice) but these days it just saves automatically.

Not opposed to the behavior being optional, but Bonsai really needs a proper settings menu for this sort of thing.

  • It is possible to develop "buggy" custom extensions which will build, save, but not deserialize correctly from XML after save, is this a problem?

IMO it's a bad thing that it's even possible to run a workflow that won't be able to be deserialized. It honestly might not even be a bad thing for compilation to be done on a copy of the workflow that has gone through a serialize→deserialize trip. (This is probably a separate issue to consider though.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants