Skip to content

Commit 9501c34

Browse files
committed
Update gitpod Dockerfile to install GNAT Community 2020
1 parent 16ad8c5 commit 9501c34

File tree

6 files changed

+120
-3
lines changed

6 files changed

+120
-3
lines changed

.gitpod.Dockerfile

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
1-
FROM gitpod/workspace-full
1+
FROM gitpod/workspace-base:latest
2+
ENV PATH=$HOME/gnat/bin:$PATH\
3+
GPR_PROJECT_PATH=/home/gitpod/adalib/share/gpr:\
4+
/workspace/ada_language_server/subprojects/VSS/gnat:\
5+
/workspace/ada_language_server/subprojects/libadalang-tools/src:\
6+
/workspace/ada_language_server/subprojects/spawn/gnat:\
7+
/workspace/ada_language_server/subprojects/stubs\
8+
LIBRARY_TYPE=static
9+
10+
COPY scripts/gnat_install.qs /tmp/
11+
12+
RUN sudo apt-get update \
13+
&& sudo apt-get install -y \
14+
libx11-xcb1 \
15+
&& curl -SL https://community.download.adacore.com/v1/a639696a9fd3bdf0be21376cc2dc3129323cbe42?filename=gnat-2020-20200818-x86_64-linux-bin \
16+
--output /tmp/gnat-2020-20200818-x86_64-linux-bin \
17+
&& chmod +x /tmp/gnat-2020-20200818-x86_64-linux-bin \
18+
&& /tmp/gnat-2020-20200818-x86_64-linux-bin \
19+
--platform minimal --script /tmp/gnat_install.qs InstallPrefix=$HOME/gnat \
20+
&& gprinstall --uninstall gpr \
21+
&& gprinstall --uninstall aunit \
22+
&& gprinstall --uninstall aws \
23+
&& gprinstall --uninstall gnatcoll \
24+
&& sh -c "rm -rvf /opt/gnat/maintenancetool*" \
25+
&& rm -rf $HOME/gnat/share/doc \
26+
&& rm -rf $HOME/gnat/share/examples \
27+
&& rm -rf $HOME/gnat/share/gps \
28+
&& rm -rf $HOME/gnat/share/man \
29+
&& find $HOME/gnat/ -type d -empty -delete \
30+
&& rm -rf /tmp/gnat-2020-20200818-x86_64-linux-bin \
31+
&& sudo apt-get purge -y --auto-remove libx11-xcb1 \
32+
&& sudo apt-get clean \
33+
&& sudo rm -rf /var/lib/apt/lists/*
234

335
# Install custom tools, runtimes, etc.
436
# For example "bastet", a command-line tetris clone:

.gitpod.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ image:
33

44
tasks:
55
- init: echo "hello"
6+
command: |
7+
mkdir -p $HOME/adalib
8+
curl -L https://bintray.com/reznikmm/libadalang/download_file\?file_path=libadalang-Linux-stable-static.tar.gz \
9+
| tar xzf - -C $HOME/adalib
10+
git -C subprojects clone https://github.com/AdaCore/VSS.git
11+
git -C subprojects clone https://github.com/AdaCore/spawn.git
12+
git -C subprojects clone https://github.com/AdaCore/libadalang-tools.git
13+
gp open doc/gitpod.md
14+
echo make LIBRARY_TYPE=static
615
716
vscode:
817
extensions:
918
- [email protected]:b56gZDvQ5KBm6u34IBzm1g==
19+
- [email protected]:F9uLpAOde6r0l7rgMC8LTQ==

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
"version": "0.2.0",
5+
"configurations": [
6+
{
7+
"type": "gdb",
8+
"request": "launch",
9+
"name": "Launch Program",
10+
"target": ".obj/server/ada_language_server",
11+
"cwd": "${workspaceRoot}",
12+
"valuesFormatting": "parseText"
13+
}
14+
]
15+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/AdaCore/ada_language_server)
21

32
# Ada Language Server
43

54
[![Build binaries](https://github.com/AdaCore/ada_language_server/workflows/Build%20binaries/badge.svg)](https://github.com/AdaCore/ada_language_server/actions)
6-
[ ![Download](https://api.bintray.com/packages/reznikmm/ada-language-server/ada-language-server/images/download.svg) ](https://bintray.com/reznikmm/ada-language-server/ada-language-server/_latestVersion)
5+
[![Download](https://api.bintray.com/packages/reznikmm/ada-language-server/ada-language-server/images/download.svg) ](https://bintray.com/reznikmm/ada-language-server/ada-language-server/_latestVersion)
6+
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/AdaCore/ada_language_server/tree/edge)
77

88
This repository contains an implementation of the [Microsoft Language Server Protocol](https://microsoft.github.io/language-server-protocol/)
99
for Ada/SPARK.

doc/gitpod.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# gitpod.io integration
2+
3+
> [Gitpod](https://www.gitpod.io/) is an open source platform for
4+
> automated and ready-to-code development environments that blends into
5+
> your existing workflow. It enables developers to describe their dev
6+
> environment as code and start instant and fresh development environments
7+
> for each new task directly from your browser.
8+
9+
In a gidpod session you can:
10+
11+
* navigate and edit the LSP Server sources
12+
* commit changes and send pull requests
13+
* collaborate and share the workspace
14+
(See https://www.gitpod.io/docs/sharing-and-collaboration/)
15+
* build and check compiler diagnostics using `/Terminal/Run Build Task...`
16+
menu
17+
* start debugger with `/Debug/Start Debugging` menu (or `F5`)
18+
19+
The aditor has a lot of commands build in. Press `F1` to search a command.
20+
21+
By default the editor is configured for the `gnat/lsp_server.gpr` project.
22+
You can switch the project by changing `/File/Settings/Open Preferences` or
23+
`Ctrl+,`, see Ada section.
24+

scripts/gnat_install.qs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
function Controller() {
2+
installer.setValue("TargetDir", installer.value("InstallPrefix"));
3+
installer.autoRejectMessageBoxes();
4+
installer.installationFinished.connect(function() {
5+
gui.clickButton(buttons.NextButton);
6+
})
7+
}
8+
9+
Controller.prototype.ComponentSelectionPageCallback = function()
10+
{
11+
var page = gui.currentPageWidget();
12+
13+
page.deselectAll();
14+
page.selectComponent("com.adacore.gnat");
15+
gui.clickButton(buttons.NextButton);
16+
}
17+
18+
Controller.prototype.LicenseAgreementPageCallback = function()
19+
{
20+
var page = gui.pageById(QInstaller.LicenseCheck);
21+
22+
page.AcceptLicenseRadioButton.click();
23+
gui.clickButton(buttons.NextButton);
24+
}
25+
26+
Controller.prototype.IntroductionPageCallback =
27+
Controller.prototype.TargetDirectoryPageCallback =
28+
Controller.prototype.ReadyForInstallationPageCallback = function()
29+
{
30+
gui.clickButton(buttons.NextButton);
31+
}
32+
33+
Controller.prototype.FinishedPageCallback = function()
34+
{
35+
gui.clickButton(buttons.FinishButton);
36+
}

0 commit comments

Comments
 (0)