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

switch should clear last scratch save #4878

Open
ceedubs opened this issue Apr 11, 2024 · 0 comments
Open

switch should clear last scratch save #4878

ceedubs opened this issue Apr 11, 2024 · 0 comments
Labels
dx Developer experience improvements or workflow fixes papercut

Comments

@ceedubs
Copy link
Contributor

ceedubs commented Apr 11, 2024

Currently it's easy to run into unexpected behavior if you use the switch command after having saved a scratch file. For example:

  • Save a scratch file with some new definitions.
  • switch to another project/namespace.
  • Run add or update
  • Now you have added definitions to the second project that might have dependencies that are only in the first project.

Another example:

  • Save a main function in a scratch file.
  • switch to a second project.
  • run main, expecting to run the main function saved in project 2.
  • Instead you run the main function from your scratch file (targeting project 1), that might not even be added to the codebase.

The same should apply to any command that changes your namespace. Examples that come to mind: clone, upgrade, ns/cd.

@aryairani aryairani added the dx Developer experience improvements or workflow fixes label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer experience improvements or workflow fixes papercut
Projects
None yet
Development

No branches or pull requests

2 participants