-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Separation of local vs remote lowercase-C contexts (for cd, prefix, run/local, etc) #1752
Comments
Hi @bitprophet - were you thinking of #1637? |
Yep. There is still some work to be done on #1755, but it's in a state where it and it's sibling PR for invoke can be reviewed/discussed. |
#1858 brings up one possible angle on the run-vs-local side of things, namely adding a I think we still want to reject this approach, as it sullies Invoke and doesn't entirely solve the issue (we're still gonna have problems with things like I also do still think (at this point in time, months later) that #1755's approach may be the only sensible way forward, tho I have to reread it and give a harder think on any other obvious APIs that come to mind. But having the two sides of the conversation as discrete API objects seems hard to beat for explicitness. It's just gonna be hard to wrangle re: backwards compatibility (& if put out in a backwards compat fashion it'll introduce extra confusion; however given there's already a lot of confusion around this......) |
Had an idea.. it might be possible to maintain compatibility at the executor level. In #1755, The question then is whether or not it's worth the added complexity and whether or not this behavior will confuse users. IDK if this might be too "clever". Worth trying - can always dump the changes. |
I'd suggest replacing the "Connection" object with a multi-context: FabricContext. By default FabricContext would delegate all Context API calls to its remote (fabric This is a very similar proposal to #1755, but drops the necessity to support two separate APIs. The Moreover, this opens up the possibility of supporting multiple remotes in a single Context without hacky modifying of 'host' dynamically. |
(Cannot find an old ticket for this :( thought there was one...)
Fabric 1 had
with cd:
andwith lcd:
and similar dual APIs for users that needed to track context-y state (cwd, prefixes list etc) differently for the remote vs local ends.Invoke only has the one local context and doesn't care.
Fabric 2 inherits from Invoke but failed to grow distinct remote-vs-local APIs before 2.0 (besides the much earlier implementation of "move Invoke's
run
to Fabric 2'slocal
", which presents its own set of problems around "what kind of Context am I dealing with right now and what methods does it have?").This needs solving and I assume in the obvious fashion, i.e. growing new API members (named explicitly either after local or remote) and the appropriate state storage (on Connection or in config).
This will sadly be a backwards compatibility break (insofar as
with c.cd()
currently changes both ends and will revert to changing only one) but the software's only been out a week and I think we can argue that this was a bug. Otherwise it'll be the shortest lived major version number ever 😐This is strongly related to #1686 which is for the run-vs-local config divergence.
The text was updated successfully, but these errors were encountered: