Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Issue: Theme Check Language Server Crashes #107

Closed
mkromann opened this issue Dec 14, 2022 · 8 comments
Closed

Issue: Theme Check Language Server Crashes #107

mkromann opened this issue Dec 14, 2022 · 8 comments

Comments

@mkromann
Copy link

mkromann commented Dec 14, 2022

Hi. I am trying out the extension to test the prettier plugin integration but having issues when it starts. The theme check language server attempts to initialise but crashes multiple times. It looks like this within vscode:

2022 12 14_10 19 06 • Code — footer liquid — maerkbare dk@2x

I have attempted to reinstall the shopify-cli and ruby without any luck.

Shopify CLI version is 3.26.0 (installed through Homebrew).
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin21]

Do you have any idea what might be the issue? Also let me know if you need more information.

The output log is the following:

── external error ──────────────────────────────────────────────────────────────

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
/opt/homebrew/opt/ruby/bin/ruby -I
/opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/3.1.0 extconf.rb
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-19541-e8seci
sitelibdir\=./.gem.20221214-19541-e8seci clean

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-19541-e8seci
sitelibdir\=./.gem.20221214-19541-e8seci
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DynamicLibrary.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
compiling ffi.c
linking shared-object ffi_c.bundle
ld: warning: ignoring file
/opt/homebrew/Cellar/ruby/3.1.3/lib/libruby.3.1.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_rb_ary_detransient", referenced from:
      _memory_put_array_of_int8 in AbstractMemory.o
      _memory_put_array_of_uint8 in AbstractMemory.o
      _memory_put_array_of_int16 in AbstractMemory.o
      _memory_put_array_of_uint16 in AbstractMemory.o
      _memory_put_array_of_int32 in AbstractMemory.o
      _memory_put_array_of_uint32 in AbstractMemory.o
      _memory_put_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_dup", referenced from:
      _fntype_param_types in FunctionInfo.o
      _struct_layout_fields in StructLayout.o
      _struct_layout_members in StructLayout.o
      _struct_layout_to_a in StructLayout.o
  "_rb_ary_entry", referenced from:
      _invoke_callback in Function.o
      _fntype_initialize in FunctionInfo.o
      _struct_layout_initialize in StructLayout.o
      _variadic_initialize in Variadic.o
      _variadic_invoke in Variadic.o
  "_rb_ary_new", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_new_capa", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_new_from_values", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_push", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_block_given_p", referenced from:
      _buffer_initialize in Buffer.o
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
      _memptr_initialize in MemoryPointer.o
  "_rb_block_proc", referenced from:
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
  "_rb_cFalseClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cFloat", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cInteger", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cModule", referenced from:
      _function_attach in Function.o
  "_rb_cNilClass", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cObject", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_longdouble_new in LongDouble.o
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Struct_Init in Struct.o
      _rbffi_StructLayout_Init in StructLayout.o
      ...
  "_rb_cProc", referenced from:
      _function_init in Function.o
      _invoke_callback in Function.o
      _function_field_put in StructLayout.o
  "_rb_cString", referenced from:
      _array_field_put in StructLayout.o
  "_rb_cSymbol", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cTrueClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_call_super", referenced from:
      _inline_array_to_s in Struct.o
  "_rb_class2name", referenced from:
      _struct_set_layout in Struct.o
      _struct_class_layout in Struct.o
  "_rb_class_new_instance", referenced from:
      _function_initialize in Function.o
      _memptr_s_from_string in MemoryPointer.o
      _rbffi_Pointer_Init in Pointer.o
      _inline_array_aref in Struct.o
      _array_field_get in StructLayout.o
      _rbffi_NativeValue_ToRuby in Types.o
  "_rb_const_defined", referenced from:
      _rbffi_num2longdouble in LongDouble.o
  "_rb_const_get", referenced from:
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Type_Init in Type.o
      _variadic_invoke in Variadic.o
  "_rb_const_set", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cv_set", referenced from:
      _function_attach in Function.o
  "_rb_data_object_zalloc", referenced from:
      _memory_allocate in AbstractMemory.o
      _array_type_s_allocate in ArrayType.o
      _buffer_allocate in Buffer.o
      _buffer_alloc_inout in Buffer.o
      _slice in Buffer.o
      _library_allocate in DynamicLibrary.o
      _library_open in DynamicLibrary.o
      ...
  "_rb_debug_rstring_null_ptr", referenced from:
      _memory_put_string in AbstractMemory.o
      _memory_put_bytes in AbstractMemory.o
      _RSTRING_PTR in FunctionInfo.o
      _rbffi_num2longdouble in LongDouble.o
      _ptr_free.cold.1 in Pointer.o
      _RSTRING_PTR in Variadic.o
  "_rb_define_alias", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_Pointer_Init in Pointer.o
      _rbffi_Struct_Init in Struct.o
  "_rb_define_alloc_func", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_attr", referenced from:
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
  "_rb_define_class_under", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_const", referenced from:
      _rbf[Info  - 10:33:30 AM] Connection to server got closed. Server will restart.
[Error - 10:33:30 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:33:30 AM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

── external error ──────────────────────────────────────────────────────────────

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
/opt/homebrew/opt/ruby/bin/ruby -I
/opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/3.1.0 extconf.rb
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-20248-owgm4j
sitelibdir\=./.gem.20221214-20248-owgm4j clean

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-20248-owgm4j
sitelibdir\=./.gem.20221214-20248-owgm4j
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DynamicLibrary.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
compiling ffi.c
linking shared-object ffi_c.bundle
ld: warning: ignoring file
/opt/homebrew/Cellar/ruby/3.1.3/lib/libruby.3.1.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_rb_ary_detransient", referenced from:
      _memory_put_array_of_int8 in AbstractMemory.o
      _memory_put_array_of_uint8 in AbstractMemory.o
      _memory_put_array_of_int16 in AbstractMemory.o
      _memory_put_array_of_uint16 in AbstractMemory.o
      _memory_put_array_of_int32 in AbstractMemory.o
      _memory_put_array_of_uint32 in AbstractMemory.o
      _memory_put_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_dup", referenced from:
      _fntype_param_types in FunctionInfo.o
      _struct_layout_fields in StructLayout.o
      _struct_layout_members in StructLayout.o
      _struct_layout_to_a in StructLayout.o
  "_rb_ary_entry", referenced from:
      _invoke_callback in Function.o
      _fntype_initialize in FunctionInfo.o
      _struct_layout_initialize in StructLayout.o
      _variadic_initialize in Variadic.o
      _variadic_invoke in Variadic.o
  "_rb_ary_new", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_new_capa", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_new_from_values", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_push", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_block_given_p", referenced from:
      _buffer_initialize in Buffer.o
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
      _memptr_initialize in MemoryPointer.o
  "_rb_block_proc", referenced from:
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
  "_rb_cFalseClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cFloat", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cInteger", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cModule", referenced from:
      _function_attach in Function.o
  "_rb_cNilClass", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cObject", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_longdouble_new in LongDouble.o
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Struct_Init in Struct.o
      _rbffi_StructLayout_Init in StructLayout.o
      ...
  "_rb_cProc", referenced from:
      _function_init in Function.o
      _invoke_callback in Function.o
      _function_field_put in StructLayout.o
  "_rb_cString", referenced from:
      _array_field_put in StructLayout.o
  "_rb_cSymbol", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cTrueClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_call_super", referenced from:
      _inline_array_to_s in Struct.o
  "_rb_class2name", referenced from:
      _struct_set_layout in Struct.o
      _struct_class_layout in Struct.o
  "_rb_class_new_instance", referenced from:
      _function_initialize in Function.o
      _memptr_s_from_string in MemoryPointer.o
      _rbffi_Pointer_Init in Pointer.o
      _inline_array_aref in Struct.o
      _array_field_get in StructLayout.o
      _rbffi_NativeValue_ToRuby in Types.o
  "_rb_const_defined", referenced from:
      _rbffi_num2longdouble in LongDouble.o
  "_rb_const_get", referenced from:
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Type_Init in Type.o
      _variadic_invoke in Variadic.o
  "_rb_const_set", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cv_set", referenced from:
      _function_attach in Function.o
  "_rb_data_object_zalloc", referenced from:
      _memory_allocate in AbstractMemory.o
      _array_type_s_allocate in ArrayType.o
      _buffer_allocate in Buffer.o
      _buffer_alloc_inout in Buffer.o
      _slice in Buffer.o
      _library_allocate in DynamicLibrary.o
      _library_open in DynamicLibrary.o
      ...
  "_rb_debug_rstring_null_ptr", referenced from:
      _memory_put_string in AbstractMemory.o
      _memory_put_bytes in AbstractMemory.o
      _RSTRING_PTR in FunctionInfo.o
      _rbffi_num2longdouble in LongDouble.o
      _ptr_free.cold.1 in Pointer.o
      _RSTRING_PTR in Variadic.o
  "_rb_define_alias", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_Pointer_Init in Pointer.o
      _rbffi_Struct_Init in Struct.o
  "_rb_define_alloc_func", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_attr", referenced from:
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
  "_rb_define_class_under", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_const", referenced from:
      _rbf[Info  - 10:33:39 AM] Connection to server got closed. Server will restart.
[Error - 10:33:39 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:33:39 AM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

── external error ──────────────────────────────────────────────────────────────

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
/opt/homebrew/opt/ruby/bin/ruby -I
/opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/3.1.0 extconf.rb
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-20937-baxoix
sitelibdir\=./.gem.20221214-20937-baxoix clean

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-20937-baxoix
sitelibdir\=./.gem.20221214-20937-baxoix
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DynamicLibrary.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
compiling ffi.c
linking shared-object ffi_c.bundle
ld: warning: ignoring file
/opt/homebrew/Cellar/ruby/3.1.3/lib/libruby.3.1.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_rb_ary_detransient", referenced from:
      _memory_put_array_of_int8 in AbstractMemory.o
      _memory_put_array_of_uint8 in AbstractMemory.o
      _memory_put_array_of_int16 in AbstractMemory.o
      _memory_put_array_of_uint16 in AbstractMemory.o
      _memory_put_array_of_int32 in AbstractMemory.o
      _memory_put_array_of_uint32 in AbstractMemory.o
      _memory_put_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_dup", referenced from:
      _fntype_param_types in FunctionInfo.o
      _struct_layout_fields in StructLayout.o
      _struct_layout_members in StructLayout.o
      _struct_layout_to_a in StructLayout.o
  "_rb_ary_entry", referenced from:
      _invoke_callback in Function.o
      _fntype_initialize in FunctionInfo.o
      _struct_layout_initialize in StructLayout.o
      _variadic_initialize in Variadic.o
      _variadic_invoke in Variadic.o
  "_rb_ary_new", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_new_capa", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_new_from_values", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_push", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_block_given_p", referenced from:
      _buffer_initialize in Buffer.o
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
      _memptr_initialize in MemoryPointer.o
  "_rb_block_proc", referenced from:
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
  "_rb_cFalseClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cFloat", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cInteger", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cModule", referenced from:
      _function_attach in Function.o
  "_rb_cNilClass", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cObject", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_longdouble_new in LongDouble.o
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Struct_Init in Struct.o
      _rbffi_StructLayout_Init in StructLayout.o
      ...
  "_rb_cProc", referenced from:
      _function_init in Function.o
      _invoke_callback in Function.o
      _function_field_put in StructLayout.o
  "_rb_cString", referenced from:
      _array_field_put in StructLayout.o
  "_rb_cSymbol", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cTrueClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_call_super", referenced from:
      _inline_array_to_s in Struct.o
  "_rb_class2name", referenced from:
      _struct_set_layout in Struct.o
      _struct_class_layout in Struct.o
  "_rb_class_new_instance", referenced from:
      _function_initialize in Function.o
      _memptr_s_from_string in MemoryPointer.o
      _rbffi_Pointer_Init in Pointer.o
      _inline_array_aref in Struct.o
      _array_field_get in StructLayout.o
      _rbffi_NativeValue_ToRuby in Types.o
  "_rb_const_defined", referenced from:
      _rbffi_num2longdouble in LongDouble.o
  "_rb_const_get", referenced from:
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Type_Init in Type.o
      _variadic_invoke in Variadic.o
  "_rb_const_set", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cv_set", referenced from:
      _function_attach in Function.o
  "_rb_data_object_zalloc", referenced from:
      _memory_allocate in AbstractMemory.o
      _array_type_s_allocate in ArrayType.o
      _buffer_allocate in Buffer.o
      _buffer_alloc_inout in Buffer.o
      _slice in Buffer.o
      _library_allocate in DynamicLibrary.o
      _library_open in DynamicLibrary.o
      ...
  "_rb_debug_rstring_null_ptr", referenced from:
      _memory_put_string in AbstractMemory.o
      _memory_put_bytes in AbstractMemory.o
      _RSTRING_PTR in FunctionInfo.o
      _rbffi_num2longdouble in LongDouble.o
      _ptr_free.cold.1 in Pointer.o
      _RSTRING_PTR in Variadic.o
  "_rb_define_alias", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_Pointer_Init in Pointer.o
      _rbffi_Struct_Init in Struct.o
  "_rb_define_alloc_func", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_attr", referenced from:
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
  "_rb_define_class_under", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_const", referenced from:
      _rbf[Info  - 10:33:47 AM] Connection to server got closed. Server will restart.
[Error - 10:33:47 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:33:47 AM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:33:47 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

── external error ──────────────────────────────────────────────────────────────

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
/opt/homebrew/opt/ruby/bin/ruby -I
/opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/3.1.0 extconf.rb
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-21631-jzspp9
sitelibdir\=./.gem.20221214-21631-jzspp9 clean

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-21631-jzspp9
sitelibdir\=./.gem.20221214-21631-jzspp9
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DynamicLibrary.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
compiling ffi.c
linking shared-object ffi_c.bundle
ld: warning: ignoring file
/opt/homebrew/Cellar/ruby/3.1.3/lib/libruby.3.1.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_rb_ary_detransient", referenced from:
      _memory_put_array_of_int8 in AbstractMemory.o
      _memory_put_array_of_uint8 in AbstractMemory.o
      _memory_put_array_of_int16 in AbstractMemory.o
      _memory_put_array_of_uint16 in AbstractMemory.o
      _memory_put_array_of_int32 in AbstractMemory.o
      _memory_put_array_of_uint32 in AbstractMemory.o
      _memory_put_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_dup", referenced from:
      _fntype_param_types in FunctionInfo.o
      _struct_layout_fields in StructLayout.o
      _struct_layout_members in StructLayout.o
      _struct_layout_to_a in StructLayout.o
  "_rb_ary_entry", referenced from:
      _invoke_callback in Function.o
      _fntype_initialize in FunctionInfo.o
      _struct_layout_initialize in StructLayout.o
      _variadic_initialize in Variadic.o
      _variadic_invoke in Variadic.o
  "_rb_ary_new", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_new_capa", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_new_from_values", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_push", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_block_given_p", referenced from:
      _buffer_initialize in Buffer.o
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
      _memptr_initialize in MemoryPointer.o
  "_rb_block_proc", referenced from:
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
  "_rb_cFalseClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cFloat", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cInteger", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cModule", referenced from:
      _function_attach in Function.o
  "_rb_cNilClass", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cObject", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_longdouble_new in LongDouble.o
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Struct_Init in Struct.o
      _rbffi_StructLayout_Init in StructLayout.o
      ...
  "_rb_cProc", referenced from:
      _function_init in Function.o
      _invoke_callback in Function.o
      _function_field_put in StructLayout.o
  "_rb_cString", referenced from:
      _array_field_put in StructLayout.o
  "_rb_cSymbol", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cTrueClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_call_super", referenced from:
      _inline_array_to_s in Struct.o
  "_rb_class2name", referenced from:
      _struct_set_layout in Struct.o
      _struct_class_layout in Struct.o
  "_rb_class_new_instance", referenced from:
      _function_initialize in Function.o
      _memptr_s_from_string in MemoryPointer.o
      _rbffi_Pointer_Init in Pointer.o
      _inline_array_aref in Struct.o
      _array_field_get in StructLayout.o
      _rbffi_NativeValue_ToRuby in Types.o
  "_rb_const_defined", referenced from:
      _rbffi_num2longdouble in LongDouble.o
  "_rb_const_get", referenced from:
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Type_Init in Type.o
      _variadic_invoke in Variadic.o
  "_rb_const_set", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cv_set", referenced from:
      _function_attach in Function.o
  "_rb_data_object_zalloc", referenced from:
      _memory_allocate in AbstractMemory.o
      _array_type_s_allocate in ArrayType.o
      _buffer_allocate in Buffer.o
      _buffer_alloc_inout in Buffer.o
      _slice in Buffer.o
      _library_allocate in DynamicLibrary.o
      _library_open in DynamicLibrary.o
      ...
  "_rb_debug_rstring_null_ptr", referenced from:
      _memory_put_string in AbstractMemory.o
      _memory_put_bytes in AbstractMemory.o
      _RSTRING_PTR in FunctionInfo.o
      _rbffi_num2longdouble in LongDouble.o
      _ptr_free.cold.1 in Pointer.o
      _RSTRING_PTR in Variadic.o
  "_rb_define_alias", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_Pointer_Init in Pointer.o
      _rbffi_Struct_Init in Struct.o
  "_rb_define_alloc_func", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_attr", referenced from:
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
  "_rb_define_class_under", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_const", referenced from:
      _rbf[Info  - 10:33:55 AM] Connection to server got closed. Server will restart.
[Error - 10:33:55 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:33:55 AM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:33:55 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

── external error ──────────────────────────────────────────────────────────────

Error coming from `/opt/homebrew/opt/ruby/bin/bundle install`

Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
/opt/homebrew/opt/ruby/bin/ruby -I
/opt/homebrew/Cellar/ruby/3.1.3/lib/ruby/3.1.0 extconf.rb
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-22319-x8june
sitelibdir\=./.gem.20221214-22319-x8june clean

current directory:
/Users/kromann/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.32.0/ruby/3.1
.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20221214-22319-x8june
sitelibdir\=./.gem.20221214-22319-x8june
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DynamicLibrary.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
compiling ffi.c
linking shared-object ffi_c.bundle
ld: warning: ignoring file
/opt/homebrew/Cellar/ruby/3.1.3/lib/libruby.3.1.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_rb_ary_detransient", referenced from:
      _memory_put_array_of_int8 in AbstractMemory.o
      _memory_put_array_of_uint8 in AbstractMemory.o
      _memory_put_array_of_int16 in AbstractMemory.o
      _memory_put_array_of_uint16 in AbstractMemory.o
      _memory_put_array_of_int32 in AbstractMemory.o
      _memory_put_array_of_uint32 in AbstractMemory.o
      _memory_put_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_dup", referenced from:
      _fntype_param_types in FunctionInfo.o
      _struct_layout_fields in StructLayout.o
      _struct_layout_members in StructLayout.o
      _struct_layout_to_a in StructLayout.o
  "_rb_ary_entry", referenced from:
      _invoke_callback in Function.o
      _fntype_initialize in FunctionInfo.o
      _struct_layout_initialize in StructLayout.o
      _variadic_initialize in Variadic.o
      _variadic_invoke in Variadic.o
  "_rb_ary_new", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_new_capa", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_new_from_values", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_push", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_block_given_p", referenced from:
      _buffer_initialize in Buffer.o
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
      _memptr_initialize in MemoryPointer.o
  "_rb_block_proc", referenced from:
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
  "_rb_cFalseClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cFloat", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cInteger", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cModule", referenced from:
      _function_attach in Function.o
  "_rb_cNilClass", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cObject", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_longdouble_new in LongDouble.o
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Struct_Init in Struct.o
      _rbffi_StructLayout_Init in StructLayout.o
      ...
  "_rb_cProc", referenced from:
      _function_init in Function.o
      _invoke_callback in Function.o
      _function_field_put in StructLayout.o
  "_rb_cString", referenced from:
      _array_field_put in StructLayout.o
  "_rb_cSymbol", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cTrueClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_call_super", referenced from:
      _inline_array_to_s in Struct.o
  "_rb_class2name", referenced from:
      _struct_set_layout in Struct.o
      _struct_class_layout in Struct.o
  "_rb_class_new_instance", referenced from:
      _function_initialize in Function.o
      _memptr_s_from_string in MemoryPointer.o
      _rbffi_Pointer_Init in Pointer.o
      _inline_array_aref in Struct.o
      _array_field_get in StructLayout.o
      _rbffi_NativeValue_ToRuby in Types.o
  "_rb_const_defined", referenced from:
      _rbffi_num2longdouble in LongDouble.o
  "_rb_const_get", referenced from:
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Type_Init in Type.o
      _variadic_invoke in Variadic.o
  "_rb_const_set", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cv_set", referenced from:
      _function_attach in Function.o
  "_rb_data_object_zalloc", referenced from:
      _memory_allocate in AbstractMemory.o
      _array_type_s_allocate in ArrayType.o
      _buffer_allocate in Buffer.o
      _buffer_alloc_inout in Buffer.o
      _slice in Buffer.o
      _library_allocate in DynamicLibrary.o
      _library_open in DynamicLibrary.o
      ...
  "_rb_debug_rstring_null_ptr", referenced from:
      _memory_put_string in AbstractMemory.o
      _memory_put_bytes in AbstractMemory.o
      _RSTRING_PTR in FunctionInfo.o
      _rbffi_num2longdouble in LongDouble.o
      _ptr_free.cold.1 in Pointer.o
      _RSTRING_PTR in Variadic.o
  "_rb_define_alias", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_Pointer_Init in Pointer.o
      _rbffi_Struct_Init in Struct.o
  "_rb_define_alloc_func", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_attr", referenced from:
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
  "_rb_define_class_under", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_ArrayType_Init in ArrayType.o
      _rbffi_Buffer_Init in Buffer.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_Function_Init in Function.o
      _rbffi_FunctionInfo_Init in FunctionInfo.o
      _rbffi_MappedType_Init in MappedType.o
      ...
  "_rb_define_const", referenced from:
      _rbf[Error - 10:34:03 AM] The Theme Check Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 10:34:03 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:34:03 AM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:34:03 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
@charlespwd
Copy link
Contributor

Yikes. That's not a pretty stack trace...

Did you try with brew install theme-check (instead of the Shopify CLI)?

From what I can see, the trace shows signs of the shopify-cli 3 vendored ruby and I'd like to confirm if it's because of that or a theme-check issue.

Gives me yet another reason to try to get rid of the ruby dependency 😅

@charlespwd
Copy link
Contributor

charlespwd commented Dec 14, 2022

This part is concerning:

/opt/homebrew/Cellar/ruby/3.1.3/lib/libruby.3.1.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64`

Looks like there's a conflict in somewhere that makes it so the build is trying to link M1 and non M1 mac files.

@snacsnoc
Copy link

@charlespwd I was able to replicate this with a fresh install of shopify-cli. I found this thread but got nowhere disabling shared libs.

Running ruby -v initially gave me:

ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]

Ruby 3.2.0 and 3.1.0 gave me the same error:

/opt/homebrew/Cellar/shopify-cli/3.36.2/libexec/lib/node_modules/@shopify/cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

ExternalError: Command failed with exit code 5: /opt/homebrew/opt/ruby/bin/bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/easto/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.34.0/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c
/opt/homebrew/opt/ruby/bin/ruby -I
/opt/homebrew/Cellar/ruby/3.2.0/lib/ruby/3.2.0 extconf.rb
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
checking for whether -pthread is accepted as LDFLAGS... yes
creating extconf.h
creating Makefile

current directory:
/Users/easto/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.34.0/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230124-3926-l8adcr
sitelibdir\=./.gem.20230124-3926-l8adcr clean

current directory:
/Users/easto/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.34.0/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c
make DESTDIR\= sitearchdir\=./.gem.20230124-3926-l8adcr
sitelibdir\=./.gem.20230124-3926-l8adcr
compiling AbstractMemory.c
compiling ArrayType.c
compiling Buffer.c
compiling Call.c
compiling ClosurePool.c
compiling DynamicLibrary.c
compiling Function.c
compiling FunctionInfo.c
compiling LastError.c
compiling LongDouble.c
compiling MappedType.c
compiling MemoryPointer.c
compiling MethodHandle.c
compiling Platform.c
compiling Pointer.c
compiling Struct.c
compiling StructByValue.c
compiling StructLayout.c
compiling Thread.c
compiling Type.c
compiling Types.c
compiling Variadic.c
compiling ffi.c
linking shared-object ffi_c.bundle
ld: warning: ignoring file
/opt/homebrew/Cellar/ruby/3.2.0/lib/libruby.3.2.dylib, building for macOS-x86_64
but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_rb_ary_detransient", referenced from:
      _memory_put_array_of_int8 in AbstractMemory.o
      _memory_put_array_of_uint8 in AbstractMemory.o
      _memory_put_array_of_int16 in AbstractMemory.o
      _memory_put_array_of_uint16 in AbstractMemory.o
      _memory_put_array_of_int32 in AbstractMemory.o
      _memory_put_array_of_uint32 in AbstractMemory.o
      _memory_put_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_dup", referenced from:
      _fntype_param_types in FunctionInfo.o
      _struct_layout_fields in StructLayout.o
      _struct_layout_members in StructLayout.o
      _struct_layout_to_a in StructLayout.o
  "_rb_ary_entry", referenced from:
      _invoke_callback in Function.o
      _fntype_initialize in FunctionInfo.o
      _struct_layout_initialize in StructLayout.o
      _variadic_initialize in Variadic.o
      _variadic_invoke in Variadic.o
  "_rb_ary_new", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_new_capa", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_ary_new_from_values", referenced from:
      _struct_initialize in Struct.o
  "_rb_ary_push", referenced from:
      _memory_get_array_of_int8 in AbstractMemory.o
      _memory_get_array_of_uint8 in AbstractMemory.o
      _memory_get_array_of_int16 in AbstractMemory.o
      _memory_get_array_of_uint16 in AbstractMemory.o
      _memory_get_array_of_int32 in AbstractMemory.o
      _memory_get_array_of_uint32 in AbstractMemory.o
      _memory_get_array_of_int64 in AbstractMemory.o
      ...
  "_rb_block_given_p", referenced from:
      _buffer_initialize in Buffer.o
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
      _memptr_initialize in MemoryPointer.o
  "_rb_block_proc", referenced from:
      _rbffi_SetupCallParams in Call.o
      _function_initialize in Function.o
  "_rb_cFalseClass", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cFloat", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cInteger", referenced from:
      _rbffi_Function_ForProc in Function.o
      _rbffi_Type_Init in Type.o
  "_rb_cModule", referenced from:
      _function_attach in Function.o
  "_rb_cNilClass", referenced from:
      _rbffi_Type_Init in Type.o
  "_rb_cObject", referenced from:
      _rbffi_AbstractMemory_Init in AbstractMemory.o
      _rbffi_DynamicLibrary_Init in DynamicLibrary.o
      _rbffi_longdouble_new in LongDouble.o
      _bigdecimal_load in LongDouble.o
      _rbffi_num2longdouble in LongDouble.o
      _rbffi_Struct_Init in Struct.o
      _rbffi_StructLayout_Init in StructLayout.o
      ...

What worked:
Installing Ruby 3.0 via homebrew:

arch -arm64 brew install ruby@3.0 

Then confirming:

which -a ruby
/opt/homebrew/bin/ruby
/usr/bin/ruby

Setting default:

brew link --overwrite --force ruby@3.0
ruby -v
ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [arm64-darwin22]

shopify-cli and theme-check now work.

Looking into it further, it seems to be an issue with ffi. I found someone else reported an issue with ffi 1.15.5 here, saying that it's not supported under M1 (same version of ffi Ruby tries to use).

current directory:
/Users/easto/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/2.34.0/ruby/3.2.0/gems/ffi-1.15.5/ext/ffi_c```

@ludoboludo
Copy link

Im getting a similar issue and here is my output. I've tried the steps mentioned above but got no luck.

/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:524:in `materialize': Could not find byebug-11.1.3, ffi-1.15.5 in locally installed gems (Bundler::GemNotFound)
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:197:in `specs'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:254:in `specs_for'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/runtime.rb:18:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler.rb:170:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:159:in `with_level'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:111:in `silence'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `<top (required)>'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
	from <internal:gem_prelude>:2:in `require'
	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
[Info  - 4:20:00 PM] Connection to server got closed. Server will restart.
[Error - 4:20:00 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:00 PM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:524:in `materialize': Could not find byebug-11.1.3, ffi-1.15.5 in locally installed gems (Bundler::GemNotFound)
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:197:in `specs'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:254:in `specs_for'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/runtime.rb:18:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler.rb:170:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:159:in `with_level'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:111:in `silence'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `<top (required)>'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
	from <internal:gem_prelude>:2:in `require'
	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
[Info  - 4:20:06 PM] Connection to server got closed. Server will restart.
[Error - 4:20:06 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:06 PM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:524:in `materialize': Could not find byebug-11.1.3, ffi-1.15.5 in locally installed gems (Bundler::GemNotFound)
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:197:in `specs'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:254:in `specs_for'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/runtime.rb:18:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler.rb:170:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:159:in `with_level'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:111:in `silence'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `<top (required)>'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
	from <internal:gem_prelude>:2:in `require'
	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
[Info  - 4:20:12 PM] Connection to server got closed. Server will restart.
[Error - 4:20:12 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:12 PM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:12 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:524:in `materialize': Could not find byebug-11.1.3, ffi-1.15.5 in locally installed gems (Bundler::GemNotFound)
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:197:in `specs'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:254:in `specs_for'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/runtime.rb:18:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler.rb:170:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:159:in `with_level'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:111:in `silence'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `<top (required)>'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
	from <internal:gem_prelude>:2:in `require'
	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
[Info  - 4:20:18 PM] Connection to server got closed. Server will restart.
[Error - 4:20:18 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:18 PM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:18 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:524:in `materialize': Could not find byebug-11.1.3, ffi-1.15.5 in locally installed gems (Bundler::GemNotFound)
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:197:in `specs'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/definition.rb:254:in `specs_for'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/runtime.rb:18:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler.rb:170:in `setup'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:159:in `with_level'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/ui/shell.rb:111:in `silence'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/bundler/setup.rb:20:in `<top (required)>'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from <internal:/opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:88:in `require'
	from /opt/homebrew/Cellar/ruby/3.2.1/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
	from <internal:gem_prelude>:2:in `require'
	from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
[Error - 4:20:24 PM] The Theme Check Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 4:20:24 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:24 PM] Theme Check Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 4:20:24 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

@charlespwd
Copy link
Contributor

I'm almost 100% sure this is because of the Shopify CLI3 vendored ruby shenanigans.

What I'd recommend: Install theme-check separately and then use the language server provided by that instead of the one provided by the Shopify CLI.

  1. Install theme-check-language-server directly by running the following in your macOS terminal:

    brew install theme-check
  2. Determine where the theme-check-language-server executable exists on your file system by running the following in your macOS terminal:

    which theme-check-language-server
  3. Copy the result to your clipboard.

  4. Add the following settings to your VS Code settings.json:

    {
      "shopifyLiquid.languageServerPath": "<what's in your clipboard>"
    }

@ludoboludo
Copy link

I was also told I could use this for now. Adding SHOPIFY_CLI_BUNDLED_THEME_CLI=1 before my CLI command.
So SHOPIFY_CLI_BUNDLED_THEME_CLI=1 shopify theme dev/check
Which seem to work in my case 👍

@MKAyyoub
Copy link

Just confirming, I got same issue but following @charlespwd comment above made it work.

@jamesmengo
Copy link
Contributor

👋🏻 This repo has been moved to https://github.com/Shopify/theme-tools

If this is still an issue, please open a new issue there with the tag area:theme-check-vscode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants