From 3a76b9bbf29e25b817b0fa4645b8ff00c046a0bd Mon Sep 17 00:00:00 2001 From: Matthias Wahl Date: Wed, 19 Jun 2024 23:02:27 +0200 Subject: [PATCH] Try fixing shell and markdown issues --- CHANGELOG.md | 3 ++- LICENSE.md => LICENSE | 0 README.md | 33 ++++++++++++++++++--------- build_ci.sh | 14 ++++++------ client_vscode/{LICENSE.md => LICENSE} | 0 5 files changed, 31 insertions(+), 19 deletions(-) rename LICENSE.md => LICENSE (100%) rename client_vscode/{LICENSE.md => LICENSE} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0dec52..a6a9b28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Change Log -All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/). +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/). ## unreleased - unreleased diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/README.md b/README.md index 5d2186f..7fbe17d 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,36 @@ # Pony Language Server -Language server for Pony. See https://github.com/Microsoft/language-server-protocol for more information on the language server standard. +Language server for Pony. For more information see the [Language Server Standard](https://github.com/Microsoft/language-server-protocol). --- + ## Structure -The language server is started as a separate actor, which is given a channel for communication with the language-server client. After initialization it starts one actor for each workspace it is invoked for and routes requests to one of those workspace actors. They implement the actual LSP logic. It is also those actors that invoke the compiler actor, which executes a subset of the pony compiler passes in-process in order to get an AST to do LSP analysis on. +The language server is started as a separate actor, +which is given a channel for communication with the language-server client. +After initialization it starts one actor for each workspace it is invoked for +and routes requests to one of those workspace actors. +They implement the actual LSP logic. +It is also those actors that invoke the compiler actor, +which executes a subset of the pony compiler passes in-process +in order to get an AST to do LSP analysis on. --- + ## Extensions The VSCode extension resides in the folder `client_vscode`. - - --- + ## Development - Build ponyc: `cd ponyc`, `make libs`, `make configure`, `make build` - Prepare VSCode extension: `cd client_vscode`, `npm i` -- To debug in VSCode, press `F5`, this will compile both the vscode extension in the client folder and the pony server, using the `build.sh` script. +- To debug in VSCode, press `F5`, this will compile both the vscode extension + in the client folder and the pony server, using the `build.sh` script. If pony compilation fails, the process will stop, so you can press `F5` without fear. @@ -31,27 +40,29 @@ If pony compilation fails, the process will stop, so you can press `F5` without To compile the binary in release mode: -``` +```sh make language_server ``` -In order to compile the language server in `debug` mode, set the `config` variable to `debug`: +In order to compile the language server in `debug` mode, +set the `config` variable to `debug`: -``` +```sh make config=debug language_server ``` ## Creating the VSCode extension -``` +```sh make vscode_extension ``` -This will create the extension package as a `.vsix` file in the `build/release` folder. E.g. `build/release/pony-lsp-0.58.4.vsix`. +This will create the extension package as a `.vsix` file +in the `build/release` folder. E.g. `build/release/pony-lsp-0.58.4.vsix`. ## Installing the VSCode extension -``` +```sh code --uninstall-extension undefined_publisher.pony-lsp code --install-extension build/release/pony-lsp-0.58.4.vsix ``` diff --git a/build_ci.sh b/build_ci.sh index ad503de..66d0b4e 100755 --- a/build_ci.sh +++ b/build_ci.sh @@ -18,23 +18,23 @@ git clone https://github.com/ponylang/ponyc.git ponyc-repo cd ponyc-repo && git fetch --all --tags for PONY_VERSION in $(git tag); do - if [ $(version $PONY_VERSION) -ge $(version "0.54.0") ]; then + if [ "$(version "$PONY_VERSION")" -ge "$(version "0.54.0")" ]; then echo "Building with ponyc version: $PONY_VERSION" - ponyup update ponyc release-$PONY_VERSION + ponyup update ponyc "release-$PONY_VERSION" # copy stdlib to extension - git checkout tags/$PONY_VERSION - cd $GITHUB_WORKSPACE && cp -r ponyc-repo/packages client_vscode + git checkout tags/"$PONY_VERSION" + cd "$GITHUB_WORKSPACE" && cp -r ponyc-repo/packages client_vscode # build pony-lsp - cd $GITHUB_WORKSPACE + cd "$GITHUB_WORKSPACE" corral fetch corral run -- ponyc --bin-name pony-lsp lsp cp pony-lsp client_vscode # compile the extension - cd $GITHUB_WORKSPACE/client_vscode + cd "$GITHUB_WORKSPACE/client_vscode" npm i npm i -g vsce npm run compile - vsce package $PONY_VERSION + vsce package "$PONY_VERSION" else echo "Only versions greater than 0.54.0 are supported. Discarding $PONY_VERSION" fi diff --git a/client_vscode/LICENSE.md b/client_vscode/LICENSE similarity index 100% rename from client_vscode/LICENSE.md rename to client_vscode/LICENSE