Skip to content

Commit ddc5139

Browse files
committed
docs(workflow): document local languageservices setup
Explain how the extension consumes linked local actions/languageservices packages for unreleased language server changes. Theme: standalone-lockfile Status: wip
1 parent b97707c commit ddc5139

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ We currently do not have the capability to support Operating System (OS) certifi
5959

6060
## Contributing
6161

62-
See [CONTRIBUTING.md](CONTRIBUTING.md). A description of the architecture of the extension can be found [here](./docs/project-architecture.md).
62+
See [CONTRIBUTING.md](CONTRIBUTING.md). A description of the architecture of the extension can be found [here](./docs/project-architecture.md). If you are working on unreleased GitHub Actions language service changes, see the [development guide](./docs/development.md#working-with-local-languageservices-changes) for local setup steps.
6363

6464
## License
6565

docs/development.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,39 @@ get working packages.
4444
1. Start and debug extension with the `Watch & Launch Extension` configuration from the "Run and Debug" side panel menu
4545
1. Open a workspace in the remote extension host that contains workflow files in the `.github/workflows` directory
4646

47+
### Working with local languageservices changes
48+
49+
The extension consumes the GitHub Actions language stack from [actions/languageservices](https://github.com/actions/languageservices):
50+
51+
- `@actions/expressions`
52+
- `@actions/workflow-parser`
53+
- `@actions/languageservice`
54+
- `@actions/languageserver`
55+
56+
When you run `script/bootstrap`, the workspace links those packages into this repository's `node_modules/@actions` directory. That means local extension builds can pick up unreleased language service changes before the packages are published.
57+
58+
For example, from a local workspace where `vscode-github-actions` and `actions/languageservices` are sibling repositories:
59+
60+
```shell
61+
cd ~/vscode/actions/languageservices
62+
npm -w @actions/workflow-parser run build
63+
npm -w @actions/languageservice run build
64+
npm -w @actions/languageserver run build
65+
66+
cd ~/vscode/vscode-github-actions
67+
npm run build
68+
```
69+
70+
You can verify the local links with:
71+
72+
```shell
73+
ls -la node_modules/@actions
74+
```
75+
76+
The `@actions/*` packages should point back to the sibling `actions/languageservices` checkout. If they point to registry-installed packages instead, rerun `script/bootstrap` and reinstall from the workspace root before rebuilding.
77+
78+
After rebuilding, reload or restart the Extension Development Host so it starts the newly bundled language server from `dist/server-node.js`.
79+
4780
### Updating dependencies
4881

4982
Once you're happy with your changes, publish the changes to the respective packages. You might have to adjust package versions, so if you made a change to `actions-workflow-parser` and increase the version there, you will have to consume the updated package in `actions-languageservice`.

0 commit comments

Comments
 (0)