CLion Remote Build - Run without source syncing?

Completed

Hello,

I have a project I am developing on OSX but which requires a specific (linux hosted) build and run environment.

I have this environment running inside of docker.

I am able to run my build via a remote deployment / remote toolchain.

One thing that is very inconveinient is the need to sync my sources via SFTP. I already have my sources mounted inside of the docker environment. Is there any way to configure my remote toolchain to just use the source files I have already mounted instead of syncing?

 

0
9 comments

FYI For anybody reading this. I was able to get this going by

1. Setting up a my mapping via SFTP

2. Excluding all files from being uploaded

3. Setting up symlinks inside my docker container such that I have a source path inside of it identical to my host machine

4. Setting cmake to generate to a non-relative path outside of the source directory root

This results in the builds executing on the remote host but all explicit source syncing being skipped and works well!

0

Also feel free to comment or upvote a related feature request: https://youtrack.jetbrains.com/issue/CPP-14584.

0
Avatar
Permanently deleted user

Hello @Andrewlmurray

Here's the ticket connected to "docker support" in CLion remote-mode:  https://youtrack.jetbrains.com/issue/CPP-13751

Feel free to share your case in comments. 

0

I cannot get this to work.  I have same dir in container and local (container mounts the local dir in the same place), but it wants to sync some dirs anyway, including the cmke-build-debug-local-container dir, which has tons of stuff in it...

 

Also, it still seems to ty to sync my compiler dires, even though those are also mapped to equivalent directories

0
Avatar
Permanently deleted user

At the moment we don't have special support for docker, in particular for mounted docker volumes.

It means that for now there is no official way to skip synchronization step.

0

How cal I get it to at least use "--links" when using rsync so that it doesn't make several copies of the tree whenever there's a symbolic link?  This behavior is actually what led me to use a local container because the sync was unusable remotely due to this behavior.

0
Avatar
Permanently deleted user

Am I right that it makes several copies while uploading project to remote host? If so, unfortunately we don't use rsync on this step, as result `--links` option won't help.

https://youtrack.jetbrains.com/issue/CPP-14864

 

0

yes. unfortunately i have been forced to be using vscode for remote development due to this. I hate vscode, but I have no choice. a project that i can git clone in 30 seconds takes three hours to “upload” and then after every build, takes a ridiculously long time to be able to build or run/debug again. it’s basically impossible to iterate. i have to Admit that vscode really has the remote development down, but i understand they’re basically a web app anyway.

1

I had the same problem as Cjolivier01, and I'm forced to use VSCode as well. I gave CLion a good chance with remote development, but it's cumbersome to setup and fairly slow when working.

0

Please sign in to leave a comment.