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

add PackageCompile project and compilation script #695

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matsievskiysv
Copy link

This PR adds PackageCompiler project that allows to compile LanguageServer into binary file. Compilation script may simplify process for people unfamiliar with PackageCompiler.

This may be used to generate binary releases.

davidanthoff
davidanthoff previously approved these changes May 12, 2020
Copy link
Member

@davidanthoff davidanthoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool to see this!

We actually hope to ship a statically compiled version with the VS Code extension eventually, so experimenting with this right now is super useful.

Does the whole integration with SymbolServer actually work? We are starting a new Julia process there, and rely on package locations and things like...

@ZacLN I think we can merge this in the contrib folder, right?

@matsievskiysv
Copy link
Author

Have to say, that I couldn't get this to work with Emacs. However, compiled version threw the same errors as non-compiled one.

@davidanthoff
Copy link
Member

So I do think we should probably only merge it if it works :)

@matsievskiysv
Copy link
Author

I've only tested against this hand-crafted message:

Content-Length: 1204

{"method":"initialize","id":"61445064-26a1-42a9-916f-99c1f087c523","params":{"trace":"off","capabilities":{"workspace":{"didChangeWatchedFiles":{"dynamicRegistration":false},"didChangeConfiguration":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"applyEdit":true,"symbol":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true}},"textDocument":{"documentLink":{"dynamicRegistration":true},"codeLens":{"dynamicRegistration":true},"signatureHelp":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"hover":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"synchronization":{"didSave":true,"willSaveWaitUntil":true,"willSave":true,"dynamicRegistration":true},"definition":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true},"codeAction":{"dynamicRegistration":true},"completion":{"completionItem":{"snippetSupport":true},"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true}}},"rootUri":null,"processId":9902,"rootPath":null},"jsonrpc":"2.0"}

Response was:

Content-Length: 1020

{"id":"61445064-26a1-42a9-916f-99c1f087c523","jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":true}},"completionProvider":{"resolveProvider":false,"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"declarationProvider":false,"definitionProvider":true,"typeDefinitionProvider":false,"implementationProvider":false,"referencesProvider":true,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":true,"colorProvider":false,"documentFormattingProvider":true,"documentRangeFormattingProvider":false,"renameProvider":true,"foldingRangeProvider":false,"executeCommandProvider":{"commands":["ExplicitPackageVarImport","ExpandFunction","AddDefaultConstructor","ReexportModule","FixMissingRef"]},"selectionRangeProvider":false,"workspaceSymbolProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}}}}

So, the basic functionality is there.

@matsievskiysv
Copy link
Author

Turns out that I couldn't run this in Emacs is because of #651.

@matsievskiysv
Copy link
Author

Added repo option to script for convenience.
After applying fix from #688 (comment) I was able to use binary LanguageServer inside Emacs. It works fine.

@matsievskiysv
Copy link
Author

Rebased commit

@matsievskiysv
Copy link
Author

Now running tests before packaging executable. This triggers compilation of package internal functions. Now LanguageServer.jl starts on my machine under one second.

This PR adds script for package compilation into binary
@davidanthoff davidanthoff removed this from the Backlog milestone Oct 15, 2022
@davidanthoff davidanthoff removed their request for review October 15, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants