-
Notifications
You must be signed in to change notification settings - Fork 162
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
Replicate path to the project from local machine on remote machine. #214
Comments
So yeah, it will not work with any directory out of the home one (BTW stop calling it folder like a Windows animal). I think the more scalable approach is to leave it as is and add a project-specific option (might complicate things though). Or just don’t do anything at all since it seems to be an edge-case, isn’t it? |
Good point, sometimes project can be outside of To support both cases, we can actually replicate full path from local machine on remote machine: local machine path : /var/www/projects/mycompany.com/project-x
remote machine path: ~/mainframer/var/www/projects/mycompany.com/project-x WDYT? We should definitely add a |
👍 |
Taking into account proposed approach, maybe it's a good idea to resurge @AntonRutkevich idea to replace remote dirs in output with the local ones? #184 It should be simpler now because it can be done only via stripping out |
That will only work for projects that locally are stored under That's what I wanted too, but @ming13 raised concern:
Absolute path should be good, do you see any problems with it other than deeper nesting in the directories? |
If you convert local folder to a full path then even
Or I miss something? If I'm right, then to support #184 all you need to do is to replace all |
Ah wait, sorry I misread your original comment, yes I think we can render remote paths as local ones in the output no matter where we put the files remotely I thought you were proposing to not use absolute paths, my bad, it's time to go sleep I guess |
@dmitry-novikov can you please file a separate issue for that with links to @AntonRutkevich 's PR and short description? Otherwise I'll forget about it again :) |
Closes #214. As discussed in #214, we now replicate absolute path from local machine in `~/mainframer/…` on remote machine. This allows user to have multiple projects with same leaf node in the path without clashing, ie: - `/home/artem_zin/myproject` → `/home/remote_user/mainframer/home/artem_zin/myproject` - `/home/artem_zin/projects/myproject` → `/home/remote_user/mainframer/home/artem_zin/projects/myproject` We can also add local machine hostname, but I don't think it's a good idea. --- Integration tests were updated to expect files in new path. Also tested myself.
At the moment Mainframer 2.x creates following path on remote machine:
Example:
As we scale Mainframer for OS-wide usage #185, chances of folder name clashing increase.
Example:
In the example above projects with different path on local machine end up in same path on remote machine.
This is unfortunate and unexpected by user.
I propose following simple solution: include part of local machine project path after
$HOME
into remote path.Example:
Important note: this change is incompatible with Mainframer 2.x.
However it'll just work in many cases, but users will have old unused folder on remote machine.
@ming13 wdyt?
The text was updated successfully, but these errors were encountered: