Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ryan Lovelett
    @RLovelett
    @felix91gr I've been trying to layout a set of goals for the next release. One of the explicit goals I want to include is logging. I really appreciate the effort you've been making with tracelog. I wanted to make an issue and assign that issue to you. But I know you are busy with other projects. I did not want to add any un-necessary burden on you.
    Point is, would it be a problem if I did that?
    Valentin Knabel
    @vknabel

    @RLovelett Hi. When I started adding support for non-SPM projects in SDE, I started by just including the requested document within the requests. => no error messages and basic functionality within single files.
    In case of langserver-swift there would be two workarounds:

    • if WorkspaceError.notFound has been thrown, catch it and pass just the document as source. Not sure how many parts would need to be changed.
    • instead of throwing WorkspaceError.notFound, we would return a temporary SwiftModule containing just the document. But if we would add proper support for non-SPM projects, we might want this error back again. Even if we just want to present a warning.

    What do you think? Happy to submit a PR.

    Ryan Lovelett
    @RLovelett
    I think this is a great idea.
    I used to have something similar to it (and eventually removed it because it was not working). Though my bad idea was not based on the WorkspaceError. My implementation tried to determine based on files present and organization if it was an SPM module or not. I think your idea of being SPM first and then if that fails be something else is a much better approach.
    Félix Fischer
    @felix91gr
    Hi guys
    Take a look, it sounded pretty good :)
    Valentin Knabel
    @vknabel
    Hi. That’s really awesome! 🎉
    I didn’t expect this to happen. Seems like I need a new plan for the next hackathon. 😂
    Sam Deane
    @samdeane
    That's great news. Hopefully I can integrate it into the atom plugin.
    Valentin Knabel
    @vknabel
    AFAIK this should work with atom.
    You can try to integrate Ryan’s LangserverSwift. If that works, the official one should work, too.
    Sam Deane
    @samdeane
    Yeah, I haven't done Ryan's because it was lacking Linux support and that was my main motivation for doing the Atom stuff in the first place. I'm confident that it can be integrated though. My "hopefully" was referring to the hope that I'll find the time!
    Valentin Knabel
    @vknabel
    @samdeane the sourcekit-lsp is now open source and seems to support Linux out of the box. 👍
    https://github.com/apple/sourcekit-lsp

    Apple will even provide a VS Code extension and Sublime instructions. Seems like I can start to implement migration features in SDE.

    https://github.com/apple/sourcekit-lsp/tree/master/Editors

    Sam Deane
    @samdeane
    \o/
    Sam Deane
    @samdeane
    I've been experimenting a bit with hooking this into Atom, via the atom-languageclient. Seem to have it semi-working. Atom is talking to the lsp, and it seems to be responding, but either it's not actually providing anything useful, or I have something else mis-configured, since the auto-completions aren't showing up.
    Valentin Knabel
    @vknabel
    It only seems to work with a specific snapshot.
    Sam Deane
    @samdeane
    also, from the sourcekit-lsp notes: "Indexing does not work on Linux (jump-to-definition, find references). Should be fixed in the next Swift snapshot by swift-clang#219"
    yeah, I'm using the correct snapshot I think
    getting some indexer output when building:
    Linking ./.build/x86_64-apple-macosx10.10/debug/Configure
    Compile Swift Module 'Arguments' (1 sources)
    Index: Duplicate USR! s:9ArgumentsAAV7FailureO4nameSSvg
    Index: Duplicate USR! s:9ArgumentsAAV7FailureO4nameSSvp
    Index: Duplicate USR! s:9ArgumentsAAV7FailureO4nameSSvs
    Valentin Knabel
    @vknabel
    Ah I see. I did only use the release version for testing.
    Somewhere I read something about "getting duplicate" errors. I‘ll have a look
    Sam Deane
    @samdeane
    I've probably done something wrong somewhere - will keep digging :)
    the log output from atom is tantalising...
    Swift (Swift IDE) rpc.sendNotification textDocument/didChange {textDocument: {…}, contentChanges: Array(1)}
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/completion sending {textDocument: {…}, position: {…}, context: {…}}context: {triggerKind: 2, triggerCharacter: "s"}position: {line: 55, character: 18}textDocument: {uri: "file:///Users/sam/.local/share/xpkg/code/Sources/XPkgCommand/main.swift"}proto: Object
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/completion received (7ms) {items: Array(0), isIncomplete: false}isIncomplete: falseitems: []proto: Object
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/documentHighlight sending {textDocument: {…}, position: {…}}
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/documentHighlight received (1ms)
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover sending {textDocument: {…}, position: {…}}
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover received (1ms)
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover sending {textDocument: {…}, position: {…}}
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover received (0ms)
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover sending {textDocument: {…}, position: {…}}
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover received (0ms)
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover sending {textDocument: {…}, position: {…}}
    logger.js:33 Swift (Swift IDE) rpc.sendRequest textDocument/hover received (0ms)
    they are definitely talking to each other :)
    Valentin Knabel
    @vknabel
    No matter what I do, the only thing I receive is could not open compilation database for /Users/vknabel/Desktop/phrase-server noEntry
    Sam Deane
    @samdeane
    I'm getting that on Linux.
    Sam Deane
    @samdeane
    Dear me, trying to integrate with the Atom-IDE stuff is really really irritating. 100% obfuscation and 0% documentation :(
    Valentin Knabel
    @vknabel
    That’s why I usually tend to wait. Never use beta 0. 😅
    I will probably play a bit around with this next week.
    Sam Deane
    @samdeane
    :thumbsup: