Skip to content
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

Multiples profiles and multiples contexts #277

Closed
satiromarra opened this issue Dec 12, 2022 · 17 comments
Closed

Multiples profiles and multiples contexts #277

satiromarra opened this issue Dec 12, 2022 · 17 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects

Comments

@satiromarra
Copy link
Collaborator

Would it be possible for several "contexts" to have profiles or for profiles to have "contexts"?

[
  {
    "name": "server1",
    "context": "project/build",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/project/build",
    "profiles": {
      "dev1": {
        "host": "dev-host1",
        "remotePath": "/dev",
        "uploadOnSave": true
      },
      "prod1": {
        "host": "prod-host1",
        "remotePath": "/prod"
      }
    },
  },
  {
    "name": "server2",
    "context": "project/src",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/project/src",
    "profiles": {
      "dev2": {
        "host": "dev-host2",
        "remotePath": "/dev",
        "uploadOnSave": true
      },
      "prod2": {
        "host": "prod-host2",
        "remotePath": "/prod"
      }
    },
  }
]

Profiles with contexts:

{
  "username": "username",
  "password": "password",
  "remotePath": "/remote/workspace/a",
  "watcher": {
    "files": "dist/*.{js,css}",
    "autoUpload": false,
    "autoDelete": false
  },
  "profiles": {
    "dev": {
      "host": "dev-host",
      "remotePath": "/dev",
      "uploadOnSave": true,
      "context": "project/src"
    },
    "prod": {
      "host": "prod-host",
      "remotePath": "/prod",
      "context": "project/build"
    }
  },
  "defaultProfile": "dev"
}
@Natizyskunk Natizyskunk self-assigned this Dec 28, 2022
@Natizyskunk Natizyskunk added enhancement New feature or request question Further information is requested labels Dec 28, 2022
@Natizyskunk Natizyskunk added this to To do in vscode-sftp via automation Dec 28, 2022
@Natizyskunk Natizyskunk added the help wanted Extra attention is needed label Dec 28, 2022
@jjnxpct
Copy link

jjnxpct commented Feb 1, 2023

Interesting! Might be useful for us as well.

@jjnxpct
Copy link

jjnxpct commented Feb 9, 2023

You can try my version, I have fixed bugs and added new features, maybe this will fix the problem you are having. https://marketplace.visualstudio.com/items?itemName=satiromarra.code-sftp

Why not add your code to this repository / version? Might be easier for existing users... I'm a bit hesitant to (keep) switching to forked versions. Or is this version not maintained anymore or not accepting code from others?

@Natizyskunk
Copy link
Owner

@jjnxpct Don't worry, this version is still maintained, I haven't just as much time as I want to work on it. So it can take some time for me to merge every pull request and to answer to all issues but I'm trying my best.

@jjnxpct
Copy link

jjnxpct commented Feb 10, 2023

@satiromarra Did you create a pull request here for the features you introduced in your forked version?

@Kesuaheli
Copy link

Kesuaheli commented May 31, 2023

I just found the profiles setting and tried contexts on it just to find out it doesn't work.
This would be really helpful. For now it have to go with the "let me change the config real quick"-approach if I want to use multiple host.

I didnt tried the forked version. But since they didnt respond, I'm pinging @satiromarra again to ask if they could open a PR and link it with this issue... plz ;)

+1 for contexts in profiles


edit: wait... is it just the #313 by @wewawa?

@Natizyskunk
Copy link
Owner

Natizyskunk commented Jun 16, 2023

Related issues : #125, #127, #156, #187

@Natizyskunk
Copy link
Owner

Should be fixed in new v1.16.2 release.

Repository owner deleted a comment from satiromarra Jun 16, 2023
@Natizyskunk
Copy link
Owner

@jjnxpct Sadly I had no response from @satiromarra and I think he'll not. I'll try my best to keep this repo the official fork and the only official visual Studio Code Marketplace extension.

vscode-sftp automation moved this from To do to Done Jun 16, 2023
@satiromarra
Copy link
Collaborator Author

satiromarra commented Jun 17, 2023

@jjnxpct @Kesuaheli
Currently both branches are incompatible since I have had to start from the @liximomo branch, and from there I have had to continue with a different development.

well...
image

@Natizyskunk
Copy link
Owner

Natizyskunk commented Jun 18, 2023

@satiromarra I deleted your comment since you was ignoring me and other people even after trying to reach out to you multiple times.

As pure curiosity, I would love to know how you could have started from the @liximomo branch as it seem that you've forked my repo and there's no "liximomo" branch and has never been. Only a develop and a master branch. Even in the changelog we can clearly see that you have kept my work since my first ever release on v1.13.0 and even my last pre-1.16.2 release when it seem that you have taken over since then. it seem pretty clear from what I can see in your commits history.
image

Just FYI I didn't mind your comment, I was just unhappy to see that you were redirecting people to your work without even crediting me or liximomo after what we've done. That's the only reason why I removed it.

Also, as I've already said in the past I would be more than happy to work with you to make one big and solid project to merge all our work together since you seem to have taken some times to figure out how the code work and to implement new features. I Actually found your new GUI feature pretty cool and think that it's a great improvement.

Feel free to reach out to me so we can figure this out and find a way to make this work together 🙂

@satiromarra
Copy link
Collaborator Author

satiromarra commented Jun 18, 2023

@Natizyskunk
I agree that you deleted my message, no problem, I understand.
As for going back to the liximomo branch it's as simple as downloading the code again from their repository, you won't see it here because I carry the code on another repository server, GitHub doesn't allow to have two forks even if they come out of two different repos/branches.
Your repo and the liximomo repo are under the MIT license and that means, among other things, that you can't accuse me for appropriating your work or anyone else's nor put it in a README.
Deleting that comment is a start... 😉

And I add, i would like to be part of a project like this.

@Natizyskunk
Copy link
Owner

@satiromarra It's completely ok for me if we can clear this out 🙂

Please can you explain me what are the differences between your two forks ? Is the one you forked from mine the one you release on the vscode marketplace or instead it's the one on your other repo ?

That's seem a lot of headache just because you can't fork the same repo two different time with your same account :/
I actually can advice you something. create a new repo, you can call it whatever you want but i would recommend 'vscode-sftp-2' or something like that to keep it simple. then you clone it on your local machine, then you can simply add the original liximomo repo as a new remote : git remote add remote-liximomo https://github.com/liximomo/vscode-sftp.git. Then you can simply : create a new local branch (for example 'develop') -> fetch all tags -> checkout the liximomo remote branch you want on your local -> checkout your previously created branch ('develop' in my example) -> merge the liximomo branch you want inside your own branch (be careful to merge the local liximomo branch that you've previously checked out and not the remote one). -> Now you're set to go, you can add all your new code and then push your local branch to your new 'vscode-sftp-2' repository. Just as a sidenote, every time you want more flexibility like pulling some new/old work from another repo inside your one this is what I recommend and always do. Also maybe you can try git-flow as it can help you with keeping a clean branch structure. I actually use some of it's logic with this project.

As for the MIT License you're completely right, you can do whatever you want. I was a little bit confused and "frustrated" but hey I don't want to keep talking about the same thing over and over. I just thought that it was legitimate to at least credit @liximomo and me as it's commonly made on open-source project (but not a systematic thing, I actually agree). That's also why I always try to add credits in the CHANGELOG to every person that has made a PR with some welcomed changes (fixes, new features, typos, ...).

Finally if we can find time and a way to work together (I mean since I live in France ^^), I would love to add you as a collaborator on this repo. I'm sure we can sort this out !

@satiromarra
Copy link
Collaborator Author

satiromarra commented Jun 18, 2023

@Natizyskunk The difference between the two repositories is that after an update I tried to compile the branch without result, I tried to go back and it still didn't work, so I switched to the original repo and started to develop again from there. I could have deleted the repo and created it again from zero or as a fork of liximomo, but at least I wanted to keep that this repo was started from yours, keeping the credit.

Mixing my development with your branch will be a laborious job, since I have removed dependencies, developed my own, modified the core, have pending changes, etc ... so I would have to start from scratch with your branch.

Well, we can make time and have conversations.

@Natizyskunk
Copy link
Owner

Natizyskunk commented Jun 18, 2023

@satiromarra Thx for the details, I appreciate it. Could you share the other repo you're talking about ?

At least we can try to start somewhere ^^

@satiromarra
Copy link
Collaborator Author

My current repo is a private server. I’ll have to start a new one here on github from this branch.
Don’t forget to correct the README.

@Natizyskunk
Copy link
Owner

@satiromarra please review the new README in edit mode as I've added some comments that I would like you to check/verify before I add those infos to the project 😉

@satiromarra
Copy link
Collaborator Author

@Natizyskunk It looks very good. 👌🏼😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
vscode-sftp
  
Done
Status: Done
Development

No branches or pull requests

4 participants