Skip to content

Commit 3b847a4

Browse files
committed
Merge branch 'topic/gnatformat' into 'master'
Add gnatformat as a dependency See merge request eng/ide/ada_language_server!1655
2 parents b1f325b + 64a6683 commit 3b847a4

File tree

5 files changed

+69
-10
lines changed

5 files changed

+69
-10
lines changed

.github/workflows/build-binaries.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,24 @@ jobs:
4040
uses: actions/checkout@v3
4141
with:
4242
fetch-depth: 0
43-
- name: Get GNAT toolchain with alire (AArch64)
44-
if: ${{ matrix.os == 'macos-14' }}
43+
- name: Get GNAT toolchain with alire
44+
shell: bash
4545
run: |
4646
# alire-project/setup-alire doesn't work for ARM64 Mac OS X for now.
4747
# https://github.com/alire-project/setup-alire/pull/74
48-
curl -L -O https://github.com/alire-project/alire/releases/download/nightly/alr-nightly-bin-aarch64-macos.zip
49-
unzip alr-nightly-bin-aarch64-macos.zip
48+
# Also it depends on `engineerd/configurator@v0.0.10` not approved by IT.
49+
# https://github.com/alire-project/setup-alire/issues/75
50+
# So we fetch Alire with curl then toolchain with Alire.
51+
if [[ "$RUNNER_ARCH" == ARM64 ]] ; then
52+
ZIP=nightly/alr-nightly-bin-aarch64-macos.zip
53+
else
54+
ZIP=v2.0.1/alr-2.0.1-bin-x86_64-${RUNNER_OS}.zip
55+
fi
56+
curl -L -O https://github.com/alire-project/alire/releases/download/$ZIP
57+
unzip $(basename $ZIP)
5058
bin/alr index --reset-community
5159
bin/alr toolchain --select gnat_native^14 gprbuild
5260
echo $PWD/bin >> $GITHUB_PATH
53-
- name: Get GNAT toolchain with alire (x86_64)
54-
if: ${{ matrix.os != 'macos-14' }}
55-
uses: alire-project/setup-alire@v3
56-
with:
57-
toolchain: gnat_native^14 gprbuild
5861
- name: Build
5962
shell: bash
6063
run: |

alire.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ libgpr2 = "^24.0.0"
2626
vss = "^24.0.0"
2727
libadalang_tools = "^24.0.0"
2828
lal_refactor = "25.0.0-20240625"
29+
gnatformat = "25.0.0-20240625"
2930
gnatdoc = "^24.0.0"
3031
spawn = "^24.0.0"
3132

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name = "gnatformat"
2+
description = "An opinionated code formatter for the Ada language."
3+
version = "25.0.0-20240625"
4+
5+
authors = ["AdaCore"]
6+
maintainers = ["João Azevedo <azevedo@adacore.com>"]
7+
maintainers-logins = ["joaopsazevedo"]
8+
licenses = "Apache-2.0 WITH LLVM-exception"
9+
website = "https://github.com/AdaCore/gnatformat"
10+
11+
project-files = ["gnat/gnatformat.gpr"]
12+
13+
[environment.'case(os)'.macos.DYLD_LIBRARY_PATH]
14+
append = "${CRATE_ROOT}/.libs/relocatable"
15+
16+
[environment.'case(os)'.windows.PATH]
17+
append = "${CRATE_ROOT}/.libs/relocatable"
18+
19+
[configuration]
20+
disabled = true
21+
22+
[[depends-on]]
23+
libadalang = "^24"
24+
prettier_ada = "25.0.0-20240625"
25+
26+
[origin]
27+
url = "git+https://github.com/AdaCore/gnatformat"
28+
commit = "b418fcc894877777ecf4102410ba4eeee279e219"
29+

scripts/build_als.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ PINS="
1717
adasat
1818
gnatcoll
1919
gnatdoc
20+
gnatformat
2021
lal_refactor
2122
langkit_support
2223
libadalang
@@ -45,6 +46,7 @@ repo_vss=VSS
4546

4647
branch_gnatdoc=edge
4748
branch_lal_refactor=edge
49+
branch_gnatformat=edge
4850
branch_libgpr2=next
4951
branch_prettier_ada=main
5052

@@ -53,7 +55,7 @@ SETENV=$PWD/subprojects/libadalang/setenv.sh
5355

5456
# Set `prod` build mode
5557
########################
56-
# for adasat,lal,langkit,lal_refactor,laltools,markdown,spawn
58+
# for adasat,gnatformat,lal,langkit,lal_refactor,laltools,markdown,spawn
5759
export BUILD_MODE=prod
5860
# for others
5961
export GNATCOLL_BUILD_MODE=PROD

subprojects/gnatformat.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name = "gnatformat"
2+
description = "An opinionated code formatter for the Ada language."
3+
version = "25.0.0-20240625"
4+
5+
authors = ["AdaCore"]
6+
maintainers = ["João Azevedo <azevedo@adacore.com>"]
7+
maintainers-logins = ["joaopsazevedo"]
8+
licenses = "Apache-2.0 WITH LLVM-exception"
9+
website = "https://github.com/AdaCore/gnatformat"
10+
11+
project-files = ["gnat/gnatformat.gpr"]
12+
13+
[environment.'case(os)'.macos.DYLD_LIBRARY_PATH]
14+
append = "${CRATE_ROOT}/.libs/relocatable"
15+
16+
[environment.'case(os)'.windows.PATH]
17+
append = "${CRATE_ROOT}/.libs/relocatable"
18+
19+
[configuration]
20+
disabled = true
21+
22+
[[depends-on]]
23+
libadalang = "^24"
24+
prettier_ada = "25.0.0-20240625"

0 commit comments

Comments
 (0)