Open cgarciae opened 5 years ago
Thanks for bringing this up! Currently, we have no recommendation, but we would love to work on better IDE support with the Swift community. This is also a good question to bring up on Swift Forums, since the lack of IDEs is a general Swift concern.
For now, our primary focus for open source tooling is to make Jupyter and Colab easier to use. @marcrasi and @burmako are the lead engineers on our tooling effort and can provide some more context.
I'm also interested in trying out CLion on Linux and see if it supports Swift for TensorFlow development snapshots.
There's also a swift plugin for Vim: https://github.com/keith/swift.vim
On Mon, Apr 22, 2019, 6:41 PM Cristian Garcia notifications@github.com wrote:
This question is slightly related to #3 https://github.com/tensorflow/swift/issues/3, what is a good IDE for Linux and Windows? Right now I code in Ubuntu and am using vscode with sourcekit-lsp which is great when it works but its extremely fragile, I also tried the swift support in atom and clion with no luck. I feel all the good tooling is focused around iOS / OSX development but this could come as a problem in terms of adoption for S4TF since the ML community doesn't orbit around OSX.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/swift/issues/174, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFIU232WYLZSTM75HP5ZQ3PRY5LNANCNFSM4HHTF6DQ .
Thanks @rxwei! I've been trying to find a setup that is consistent. I was just exploring the jupyter option but I am having problems with lldb
.
The vscode
+ sourcekit-lsp
works well for single scripts but has failed me when I want to include dependencies.
It would be a shame programming without the autocomplete + error detection of the compiler.
Thanks @ziatdinovmax! Would be a good last resort, not really a fan of vim.
It would be a shame programming without the autocomplete + error detection of the compiler.
Absolutely. I'll look into CLion a bit and reply back.
I've managed to effectively use sourcekit-lsp
in Ubuntu with SPM; its tricky, not very stable but the auto-completion is worth it, might make a video on how to do it.
Is there any progress on this issue? I tried CLion on Ubuntu but no luck here, as it doesn't recognize the s4tf directory as a valid Swift toolchain path. Perhaps some binaries or libs are missing in contrast to the upstream Swift?
Since 0.4.0-rc
that comes with swift 5.1
things have gotten much better for the vscode
+ sourcekit-lsp
story, just make sure to use the swift-5.1-branch
when building sourcekit-lsp. Also, if you use SwiftPM depencies or create a project structure make sure to first run swift build
and then reload vscode
(ctrl + F5).
I have also tried using CLion but, even though it technically support S4TF and sometimes I'm to work with it for like 5 minutes, it will often freeze after a while. That does not happen with any of the plain Swift toolchains and so I opened an issue about it here a few days ago. However, there doesn't seem to be any activity on it. :/
@eaplatanios Try VSCode, its working incredible, autocomplete and linter are working perfectly. There are some PRs here which will add nice things like inserting code suggestions. I wish the non-xcode tooling received more love, but this is finally useful.
Thanks @cgarciae ! I have been using VS code and it's become significantly better in terms of code editing. However, debugging is very buggy as using the LLDB extension does not allow us evaluate Swift expressions or even just see the values of many variables (e.g., tensors). @rxwei do you know why this is happening and what could be done to improve it? xcode is much better at that.
Also, do you know what it would take to make sourcekit-lsp index while editing without requiring an explicit build?
I opened this discussion for the issue with LLDB. @pschuh @marcrasi do you know what may be wrong? I noticed you did a bit of work on LLDB support for S4TF so maybe you've bumped into this before?
I found a simple workflow to get code autocomplete with VS Code on Ubuntu without having to do any builds. I was having some difficulties building sourcekit-lsp
from source using TF's Swift toolchain.
Instead, I'm using sourcekit-lsp
from Swift for TensorFlow's installer (contained in the extracted usr/bin/
path) along with this extension: https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment and things are working fine. There is just a bit of workspace configuration required to point to sourcekit-lsp
.
This question is slightly related to #3, what is a good IDE for Linux and Windows? Right now I code in Ubuntu and am using
vscode
withsourcekit-lsp
which is great when it works but its extremely fragile, I also tried the swift support inatom
andclion
with no luck. I feel all the good tooling is focused around iOS / OSX development but this could come as a problem in terms of adoption for S4TF since the ML community doesn't orbit around OSX.