Skip to content

Commit c317f66

Browse files
committed
Merge branch 'topic/dev-doc' into 'master'
Update dev documentation on dependencies and testing Closes #1156 See merge request eng/ide/ada_language_server!1424
2 parents a78c009 + 168e590 commit c317f66

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

doc/HACKING.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,31 @@
22

33
## Dependencies
44

5-
The Ada Language Server depends on the following:
5+
The Ada Language Server depends on a number of tools and libraries listed [on the main page](https://github.com/AdaCore/ada_language_server#dependencies).
66

7-
* VSS: https://github.com/AdaCore/VSS
8-
* (optional) ada_libfswatch: https://github.com/AdaCore/ada_libfswatch,
9-
to activate filesystem monitoring.
7+
## Coding
8+
9+
The ALS repository includes a template VS Code workspace at
10+
`.vscode/settings.json.tmpl`. This allows developers to instantiate the
11+
workspace locally and customize it to their liking, in particular the
12+
`terminal.integrated.env.<os>` setting to set `PATH` and `GPR_PROJECT_PATH` as
13+
needed to provided tools and dependencies to the development environment.
14+
15+
To instantiate the VS Code workspace, simply run `make configure`. Then open VS
16+
Code at the root of the ALS repository.
17+
18+
At the first run, the workspace will recommend installing a set of extensions
19+
including a released version of the `Language Support for Ada` extension which
20+
is produced from this repository. That allows you to work with the Ada codebase
21+
of the ALS.
22+
23+
## Building
24+
25+
To build the ALS, run:
26+
27+
```sh
28+
make
29+
```
1030

1131
## Debugging
1232

@@ -40,7 +60,7 @@ This is very useful to resolve unexpected memory consumption issues.
4060

4161
To get a symbolic backtrace you need the debug information files. For the
4262
release you can download them from
43-
[GitHub Release](https://github.com/AdaCore/ada_language_server/releases)
63+
[GitHub Release](https://github.com/AdaCore/ada_language_server/releases)
4464
Assets. Assets contain an archive per platform with the ALS
4565
executable and debug information files (`.debug` file on Linux/Windows and
4666
`.dSYM` directory for Mac OS X). Extract the debug information to the directory
@@ -84,30 +104,11 @@ To write a functional test for Ada Language Server:
84104
85105
Run `make vscode-test` to run the VS Code testsuite.
86106
87-
### VS Code grammar tests
88-
89-
The following is under `integration/vscode/ada/`.
90-
91-
The grammars under `syntaxes/` are in production. An advanced classifier for Ada
92-
is under `advanced/`; this one is not in production at the moment. The testsuite
93-
supports testing all grammars.
94-
95-
Tests for the grammars are in `testsuite_grammar`, with one test per subdirectory.
96-
97-
* To run the full testsuite, call `./run_grammar_tests.sh`
98-
* To run one individual test, pass its directory as parameter to
99-
that script, for instance `./run_grammar_tests.sh testsuite_grammar/hello`
100-
101-
To create new tests, do the following:
102-
103-
* Create a directory for it, for instance `testsuite_grammar/newtest`
104-
* Add `.ads`, `.adb` or `.gpr` sources in that directory
105-
* Run the driver: the first run will create the baselines under the form
106-
of `.snap.syntaxes` and `.snap.advanced` files.
107+
If you open the ALS repository in VS Code, it is also possible to run VS Code
108+
integration tests using the provided launch configurations:
107109
108-
The engine for the test driver is implemented using
109-
[vscode-tmgrammartest](https://github.com/PanAeon/vscode-tmgrammar-test):
110-
see the full documentation there.
110+
- `(vscode) Run testsuite 'general'`
111+
- `(vscode) Run testsuite 'gnattest'`
111112
112113
### Other tests
113114

0 commit comments

Comments
 (0)