xixiaofinland / sf.nvim

22 stars 6 forks source link

Scratch Org Development - Push/Pull All #53

Closed waltonzt closed 2 months ago

waltonzt commented 2 months ago

@xixiaofinland

The next thing I am going to work on is the ability to push and pull without specifying the file. This is helpful in a workflow where multiple changes are made either locally or in the source org and you want to push/pull all of those changes.

This is a very easy change from what I can see but I would like to get your opinion on terminology.

I was thinking: push_all (SFPushAll) retrieve_all (SFRetrieveAll)

Part of me thinks this might be confusing as its not actually pushing/pulling all files but instead only actioning the changed files (Due to Source Tracking). On the other hand Salesforce has made the decision to not really care about clarity on the sf project deploy and sf project retrieve commands as the same command is used for both source tracking enabled and disabled orgs.

I would love your opinion on this.

xixiaofinland commented 2 months ago

For such commands, they apply to merely orgs with source tracking enabled otherwise an error msg displays, right?

In terms of terminology, pull_delta, pull_delta_files, pull_changed_files might be better alternatives. pull_all to me is really to pull everything.

waltonzt commented 2 months ago

If the org allows source tracking then the retrieve and deploy commands track the changes. If source tracking is not enabled then the commands do a complete deploy/retrieve each time the command is ran.

In previous iterations of the sf cli there were separate commands for source tracking orgs but with the recent changes they have combined everything into sf project retrieve and sf project deploy.

I do feel like the names you suggested better describe the functionality that I am trying to provide. The only alternative I can think of would require renaming the existing retrieve and save_and_push commands to something like retrieve_file and save_and_push_file. This would be a breaking change though so for sure would require more thought.