From ff9211bc7a62863bbdb12e6713b27abdbccc7773 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 13 Feb 2024 09:01:05 +0100 Subject: [PATCH 1/6] Fix formatter to older version --- .github/workflows/FormatCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index a733cb7cc21..7297f1c3ff5 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -29,7 +29,7 @@ jobs: # TODO: Change the call below to # format(".") run: | - julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter"))' + julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))' julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])' - name: Format check run: | From 50fdd48842e2d857fca2a9c6ef8a8512806d5dd7 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 13 Feb 2024 09:35:37 +0100 Subject: [PATCH 2/6] fix JuliaFormatter version also in utils folder --- utils/trixi-format-file.jl | 2 +- utils/trixi-format.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/trixi-format-file.jl b/utils/trixi-format-file.jl index c4d8e7c9032..ac6c7b4ff40 100755 --- a/utils/trixi-format-file.jl +++ b/utils/trixi-format-file.jl @@ -2,7 +2,7 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add("JuliaFormatter"; preserve = PRESERVE_ALL, io = devnull) +Pkg.add("JuliaFormatter"; version="1.0.45", preserve = PRESERVE_ALL, io = devnull) using JuliaFormatter: format_file diff --git a/utils/trixi-format.jl b/utils/trixi-format.jl index d1e7efa656a..70bbcdd713d 100755 --- a/utils/trixi-format.jl +++ b/utils/trixi-format.jl @@ -2,7 +2,7 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add("JuliaFormatter"; preserve = PRESERVE_ALL, io = devnull) +Pkg.add("JuliaFormatter"; version="1.0.45", preserve = PRESERVE_ALL, io = devnull) using JuliaFormatter: format From 4bc0967b8fe70989a5f3c56379aeadd12d760e39 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 13 Feb 2024 19:22:20 +0100 Subject: [PATCH 3/6] Update utils/trixi-format-file.jl Co-authored-by: Arpit Babbar --- utils/trixi-format-file.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/trixi-format-file.jl b/utils/trixi-format-file.jl index ac6c7b4ff40..18d114a4ebb 100755 --- a/utils/trixi-format-file.jl +++ b/utils/trixi-format-file.jl @@ -2,7 +2,7 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add("JuliaFormatter"; version="1.0.45", preserve = PRESERVE_ALL, io = devnull) +Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, io = devnull) using JuliaFormatter: format_file From 3b97c18c4aa89ebd61ae658f77145d2f20b80c0b Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 13 Feb 2024 19:22:27 +0100 Subject: [PATCH 4/6] Update utils/trixi-format.jl Co-authored-by: Arpit Babbar --- utils/trixi-format.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/trixi-format.jl b/utils/trixi-format.jl index 70bbcdd713d..309a38fdcb3 100755 --- a/utils/trixi-format.jl +++ b/utils/trixi-format.jl @@ -2,7 +2,7 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add("JuliaFormatter"; version="1.0.45", preserve = PRESERVE_ALL, io = devnull) +Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, io = devnull) using JuliaFormatter: format From 688f3fabd1e9599e53526728469c8b36c563e5a9 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 14 Feb 2024 07:37:20 +0100 Subject: [PATCH 5/6] Apply suggestions from code review Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- utils/trixi-format-file.jl | 3 ++- utils/trixi-format.jl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/trixi-format-file.jl b/utils/trixi-format-file.jl index 18d114a4ebb..50d3767940a 100755 --- a/utils/trixi-format-file.jl +++ b/utils/trixi-format-file.jl @@ -2,7 +2,8 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, io = devnull) +Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, + io = devnull) using JuliaFormatter: format_file diff --git a/utils/trixi-format.jl b/utils/trixi-format.jl index 309a38fdcb3..9965083915f 100755 --- a/utils/trixi-format.jl +++ b/utils/trixi-format.jl @@ -2,7 +2,8 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, io = devnull) +Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, + io = devnull) using JuliaFormatter: format From 4c3a623060a82b3f74a1176d1ac1ef0a533b680a Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 14 Feb 2024 07:53:10 +0100 Subject: [PATCH 6/6] format --- utils/trixi-format-file.jl | 2 +- utils/trixi-format.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/trixi-format-file.jl b/utils/trixi-format-file.jl index 50d3767940a..9b9a0e4949c 100755 --- a/utils/trixi-format-file.jl +++ b/utils/trixi-format-file.jl @@ -2,7 +2,7 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, +Pkg.add(PackageSpec(name = "JuliaFormatter", version = "1.0.45"); preserve = PRESERVE_ALL, io = devnull) using JuliaFormatter: format_file diff --git a/utils/trixi-format.jl b/utils/trixi-format.jl index 9965083915f..63f14078807 100755 --- a/utils/trixi-format.jl +++ b/utils/trixi-format.jl @@ -2,7 +2,7 @@ using Pkg Pkg.activate(; temp = true, io = devnull) -Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"); preserve = PRESERVE_ALL, +Pkg.add(PackageSpec(name = "JuliaFormatter", version = "1.0.45"); preserve = PRESERVE_ALL, io = devnull) using JuliaFormatter: format