Skip to content

Commit

Permalink
Try fixing shell and markdown issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mfelsche committed Jun 19, 2024
1 parent af7b26b commit 3a76b9b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
File renamed without changes.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
```
Expand Down
14 changes: 7 additions & 7 deletions build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.

0 comments on commit 3a76b9b

Please sign in to comment.