From 280500195e2ed133ab44a230fc36fd94ec9e3e94 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Fri, 31 Jul 2026 09:44:33 +0200 Subject: [PATCH 1/2] Transform paths to binary as expected The whole codebase expects to handle binaries, propagate paths as lists can cause bugs --- src/grisp_tools_util.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/grisp_tools_util.erl b/src/grisp_tools_util.erl index ae69281..11b5455 100644 --- a/src/grisp_tools_util.erl +++ b/src/grisp_tools_util.erl @@ -197,10 +197,11 @@ collect_overlay(Dir, Platform, Version, Init, CollectFun) -> case filelib:is_dir(PlatformDir) of true -> {ok, Directories} = file:list_dir(PlatformDir), - VersionDirs = filter_otp_version_directories(Directories), + BinaryDirs = [list_to_binary(D) || D <- Directories], + VersionDirs = filter_otp_version_directories(BinaryDirs), SortedDirs = lists:sort(VersionDirs), SelectedDirs = select_overlay_folders(Version, SortedDirs, []), - OverlayDirs = ["common" | SelectedDirs], + OverlayDirs = [<<"common">> | SelectedDirs], lists:foldl(fun(VersionFolder, Acc) -> collect_version_files(PlatformDir, VersionFolder, Acc, CollectFun) end, Init, OverlayDirs); @@ -568,7 +569,7 @@ collect_build_hooks(App, Root, State0) -> Prefix = hook_prefix(Hook), Info = file_info(Hook, App, filename:join(Dir, Hook)), mapz:deep_put([hooks, Prefix, Hook], Info, State1) - end, State0, filelib:wildcard("*", Dir)). + end, State0, filelib:wildcard("*", binary_to_list(Dir))). hook_prefix("post-install" ++ _) -> post_install; hook_prefix(Hook) -> error({unknown_hook_prefix, Hook}). @@ -594,7 +595,7 @@ collect_file_list(App, Dir, Root) -> ), A#{Target => file_info(Target, App, Source, Target)} end, - lists:foldl(InsertFile, #{}, filelib:wildcard("*", Dir)). + lists:foldl(InsertFile, #{}, filelib:wildcard("*", binary_to_list(Dir))). collect_file_tree(App, Root) -> filelib:fold_files(Root, ".*", true, fun(File, T) -> From 7bd73de1a2e0abef4712020da5a1896f5956ce39 Mon Sep 17 00:00:00 2001 From: Luca Succi Date: Fri, 31 Jul 2026 09:47:17 +0200 Subject: [PATCH 2/2] Update tested OTP versions --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17c49a2..a66db00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,14 +11,8 @@ jobs: name: Erlang ${{matrix.otp}} / rebar ${{matrix.rebar3}} strategy: matrix: - otp: ['26', '27'] + otp: ['27', '28', '29'] rebar3: ['3'] - # latest rebar3 versions that do not give problems with selected OTPs - include: - - otp: '24' - rebar3: '3.23.0' - - otp: '25' - rebar3: '3.24.0' steps: - uses: actions/checkout@v4