Skip to content

Conversation

@KristofferC
Copy link
Member

@KristofferC KristofferC commented Sep 10, 2019

preview had good intentions. By allowing to check what happened when executing a command without it taking effect, it was intended for the user to avoid pkg commands that mess up their project. However, in practice, no one think they will do a mistake so no one uses preview. It is also quite invasive in the code base. You constantly need to think if you are running things in preview mode and in that case try to emulate the normal usage but at the same time don't do any persistent mutations.

What is needed is instead undo + redo. This just removes preview and I will implement undo + redo to replace it (unless someone beats me to it)

@KristofferC
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Sep 10, 2019
@bors
Copy link
Contributor

bors bot commented Sep 10, 2019

@00vareladavid
Copy link
Contributor

I think this will close #996

@KristofferC
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Sep 10, 2019
1367: remove preview command r=KristofferC a=KristofferC

`preview` had good intentions. By allowing to check what happened when executing a command without it taking effect, it was intended for the user to avoid pkg commands that mess up their project. However, in practice, no one think they will do a mistake so no one uses preview. It is also quite invasive in the code base. You constantly need to think if you are running things in preview mode and in that case try to emulate the normal usage but at the same time don't do any persistent mutations.

What is needed is instead `undo` + `redo`. This just removes `preview` and I will implement `undo` + `redo` to replace it (unless someone beats me to it)

Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
@bors
Copy link
Contributor

bors bot commented Sep 10, 2019

@bors bors bot merged commit 14f5298 into master Sep 10, 2019
@bors bors bot deleted the kc/preview_bye branch September 10, 2019 12:04
@essenciary
Copy link

essenciary commented Sep 10, 2019

For what is worth, I religiously used preview to see the versions of updated packages and whether or not potential updates introduced breaking changes. Can this be achieved any other way?

As for undo/redo wouldn't that be just versioning Manifest.toml (potentially using Git)?

@KristofferC
Copy link
Member Author

KristofferC commented Sep 10, 2019

With the undo redo it would just be

pkg > up
...

# didn't like it
pkg> undo

It would be "versioning" but in memory and not as painful as having to commit all the time.

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

Successfully merging this pull request may close these issues.

4 participants