You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resolution of commands depend on Directory.GetCurrentDirectory() and AppContext.BaseDirectory(). This introduces an implicit dependency between command resolution and the process that requests it (basedirectory) and the root process that spawned everything (getcurrentdirectory).
Instead, these paths should be variables resolved / injected at runtime.
This change enables:
decoupling command resolution from process identity
increased testability of the command resolution algorithm (can setup a fake environment and assert for resolution outcome)
calling verbs in-proc and out-of-proc
The text was updated successfully, but these errors were encountered:
I don't think this would impact the user. The change suggests replacing the hard coded paths from below with parameters, that would probably get sent to TryResolveCommandSpec and then trickled down (or maybe transform CommandResolver into a non static class whose instances get constructed with them)
That would make the CommandResolver quite configurable (good for writing tests that send funky paths, good for build to ensure the command is resolved as it would have been by Compile, etc)
The resolution of commands depend on Directory.GetCurrentDirectory() and AppContext.BaseDirectory(). This introduces an implicit dependency between command resolution and the process that requests it (basedirectory) and the root process that spawned everything (getcurrentdirectory).
Instead, these paths should be variables resolved / injected at runtime.
This change enables:
The text was updated successfully, but these errors were encountered: