On platforms and runtimes

Aleix Pol aleixpol at kde.org
Tue May 23 15:02:52 UTC 2017


On Tue, May 23, 2017 at 6:04 AM, Nicolás Alvarez
<nicolas.alvarez at gmail.com> wrote:
> 2017-05-22 20:58 GMT-03:00 Aleix Pol <aleixpol at kde.org>:
>> Example:
>> A platform is 192.168.1.111
>> A runtime is ssh+sftp+the actual system
>>
>> The new abstraction provides 4 tools to interact with the platform:
>> - Path IRuntime::pathInRuntime(Path)
>> - Path IRuntime::pathInHost(Path)
>> - void startProcess(Q/KProcess*)
>> - QByteArray getenv(QByteArray name)
>>
>> By being able to access files in the runtime and execute processes in
>> it, we have everything we need to target a platform for KDevelop, from
>> any platform.
>
> I don't understand how this API would work. What would the pathIn*
> functions return when using a "ssh runtime"? How would startProcess
> run a process in a remote ssh system while keeping the QProcess API?
> What if I can copy a compiled program to the target environment
> (possibly after some packaging) and make it start, but I can't just
> run arbitrary processes? (some cloud environments, iOS, Arduino, maybe
> most embedded devices).

Note this was an example, not
You can take a look at the docker implementation to see how it works.

Roughly speaking, it would entail mounting the remote FS locally with
sshfs so that it can be accessed by the clang or python plugins. Then
run the processes in a "ssh <host> $@".

I think you have some kind of idea though, maybe it's better to
discuss it outright.

HTH,
Aleix


More information about the KDevelop-devel mailing list