mauricius / laravel-htmx

Laravel helper library for Htmx
MIT License
301 stars 14 forks source link

composer - File name too long #11

Closed wapoa closed 10 months ago

wapoa commented 10 months ago

It seems the filenames in the tests/snapshots folder is creating a "file name too long" error, which seems to be coming from the unzip package that I guess composer is using.

I am running composer on an Ubuntu VM on Windows 11.

Here is some output:

- Installing mauricius/laravel-htmx (v0.4.0): Extracting archive

Failed to extract mauricius/laravel-htmx: (50) '/usr/bin/unzip' -qq '<redacted>/src/vendor/composer/tmp-8789489caefce2fe6d56ee016c02f2c9' -d '<redacted>/src/vendor/composer/f9e20eae'

error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_defined_inline__1.txt
        File name too long
error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_even_if_it_is_enclosed_in_other_fragments__1.txt
        File name too long
error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_even_if_it_is_nested_in_other_fragments__1.txt
        File name too long
error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_even_if_it_is_not_aligned_with_the_closing_fragment__1.txt
        File name too long
error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_even_if_it_it_contains_multibyte_characters__1.txt
        File name too long
error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_whose_name_is_enclosed_in_double_quotes__1.txt
        File name too long
error:  cannot create <redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_whose_name_is_enclosed_in_single_quotes__1.txt
        File name too long

The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
    Install of mauricius/laravel-htmx failed

In ZipDownloader.php line 223:                                                                                                                                     
  The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchi  
  ve::extractTo(<redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_defined_inline__1.txt): Failed to open stream: File name too long 

In ZipDownloader.php line 210:                                                                                       
  ZipArchive::extractTo(<redacted>/src/vendor/composer/f9e20eae/mauricius-laravel-htmx-9c111be/tests/__snapshots__/FragmentBladeDirectiveTest__the_render_fragment_view_macro_can_render_a_single_fragment_defined_inline__1.txt): Failed to open stream: File name too long 

Hope this can be resolved. Looking forward to using the package!

wapoa commented 10 months ago

Not sure if this is helpful, but you can exclude the tests folder from the archive GitHub creates, since they're not really needed for those who are installing the package. This is done in the .gitattributes file as seen in the accepted answer here: https://stackoverflow.com/questions/17049313/how-to-ignore-directories-with-composer

Might be a solution.

mauricius commented 10 months ago

Good catch! I forgot to add the .gitattributes file :+1: