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

[FeatureRequest] Add Header sync button to automaticly copy header files from target linux system #215

Closed
j1and1 opened this issue Nov 2, 2017 · 7 comments
Assignees

Comments

@j1and1
Copy link

j1and1 commented Nov 2, 2017

It would be nice if there would be some kind of button called "Manually sync headers from target"....

So if you want to create a linux APP or Lib you probably will need some linux headers for that.... in the curent state of VSLinux you have to copy header files from your linux systems manually to your dev machine and then anually ad them to your build config.... and of course if you have multiple development targets the heaers may be diferent so you have to do all this multiple times...

and of course if you update lib you are linking to you will also have to copy those headers again..... and there is a high probability of screwing things up....

@robotdad
Copy link
Member

robotdad commented Nov 6, 2017

We have plans to address this issue, not quite as proposed. All of the below is our plan, it could change, etc. etc. And of course feedback is welcome or I wouldn't be sharing. :-)

What we are planning is to sync the standard include locations per connection into a local location as read only. We will provide a way to add additional locations from the remote to sync as well. The sync would occur when a connection to the remote machine is made. This local location would be accessible in VS via an environment variable in vcxproj or folder projects. As there will be a local location per connection we will use the currently selected connection for IntelliSense.

Configuration of this capability will be in a new Tools > Options pane. We will allow it to be turned off globally or per connection.

@itodirel
Copy link
Member

itodirel commented Apr 5, 2018

This feature was implemented and released in 15.7 Preview 2, which is now publicly available, please try it and let us know if you have any feedback or suggestions.
capture

@AliAskari
Copy link

@itodirel @robotdad

Do you have any plans to support copying headers that are not system headers and are not part of the project but are used in the project?

Let's say I have a third party library that I'm using in my project however the headers/sources are under a different path on the Linux machine. How do you suggest me to debug that third party library using visual studio? Manually copying is not really a great option.

@jensreck
Copy link

jensreck commented Jun 7, 2018

A further point is syncing of cross compile headers and a proper switching to the regarding platform e.g. depending on "intelliSenseMode" ("linux-gcc-x64", "linux-gcc-arm", ...), isn't it?

@AliAskari
Copy link

@itodirel @robotdad

I tried to add a task to my project and have the task copy/rsync the 3rd party headers from remote linux machine to my local windows machine however I am having some problems when I use rsync, pscp works just fine but it's not efficient at all, and I appreciate if you could help me find a solution.

I noticed that you have are distributing rsync as part of the Visual Studio installation and I tried to use it and I faced two problems:

  1. I tried using the complete path like so in tasks.vs.json:

    "command": "C:\path\to\rsync.exe"
    

    but I am getting this error

    The filename, directory name, or volume label syntax is incorrect.
    

    How should I specify the path? The path doesn't have any spaces, it would be good if you provide a solution that also works with spaces in the path.
    Also during the build step you are copying the files to remote using rsync you are just using rsync
    without the complete path, how can I use rsync without the complete path? How do you set an environment variable in my tasks.vs.json?

  2. How do you retrieve the host user/pass/port? I do not see you specifying any ports in your rsync commands? How can I have the info in the shell that runs the tasks' command?

  3. Even after trying to use rsync from a normal terminal, outside of visual studio, I cannot copy the files

    rsync.exe -t --delete -v -r --exclude=.git --exclude=.vs -e "ssh -p 2222" rsync://user@localhost:/home/user/.conan/data/ /c/conan_packages/
    

but the same command works on a non-windows machine.

Would appreciate if you provide tips/help for any of these questions.

@lukka
Copy link
Member

lukka commented Jun 8, 2018

@AliAskari could you please create a new ticket about the copy of headers from remote target to local dev machine? thanks a lot for your support

@AliAskari
Copy link

@lukka Sure, I have created an issue and also a demo repo so that it's a bit more clear. Let me know if you need more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants