Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ffi library in tests on Ruby 3.1 on Windows #21689

Closed
4 tasks
lacostej opened this issue Dec 4, 2023 · 1 comment · Fixed by #21898
Closed
4 tasks

Missing ffi library in tests on Ruby 3.1 on Windows #21689

lacostej opened this issue Dec 4, 2023 · 1 comment · Fixed by #21898

Comments

@lacostej
Copy link
Collaborator

lacostej commented Dec 4, 2023

As seen here https://ci.appveyor.com/project/KrauseFx/fastlane/builds/48659554/job/uuvwpbgd82hookvi

Fastlane tests on Windows under Ruby 3.1 fail due to missing ffi library.

10) Fastlane Fastlane::FastFile sentry returns uploaded dSYM paths
      Failure/Error:
        result = Fastlane::FastFile.new.parse("lane :test do
          upload_symbols_to_sentry(
            api_key: 'something123',
            org_slug: 'some_org',
            project_slug: 'some_project',
            dsym_path: '#{dsym_path_1}',
            dsym_paths: ['#{dsym_path_2}'])
        end").runner.execute(:test)
      LoadError:
        cannot load such file -- ffi
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/restclient/windows/root_certs.rb:2:in `require'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/restclient/windows/root_certs.rb:2:in `<top (required)>'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/restclient/windows.rb:7:in `require_relative'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/restclient/windows.rb:7:in `<top (required)>'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/restclient.rb:17:in `require'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/restclient.rb:17:in `<top (required)>'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/rest-client.rb:2:in `require'
      # ./.vendor/bundle/ruby/3.1.0/gems/rest-client-2.1.0/lib/rest-client.rb:2:in `<top (required)>'
      # ./fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb:11:in `require'
      # ./fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb:11:in `run'
      # ./fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
      # ./fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
      # ./fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
      # ./fastlane/lib/fastlane/runner.rb:229:in `chdir'
      # ./fastlane/lib/fastlane/runner.rb:229:in `execute_action'
      # ./fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
      # ./fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
      # (eval):2:in `block in parsing_binding'
      # ./fastlane/lib/fastlane/lane.rb:41:in `call'
      # ./fastlane/lib/fastlane/runner.rb:49:in `block in execute'
      # ./fastlane/lib/fastlane/runner.rb:45:in `chdir'
      # ./fastlane/lib/fastlane/runner.rb:45:in `execute'
      # ./fastlane/spec/actions_specs/upload_symbols_to_sentry_spec.rb:76:in `block (4 levels) in <top (required)>'
      # ./.vendor/bundle/ruby/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

New Issue Checklist

Issue Description

Command executed
Complete output when running fastlane, including the stack trace and command used
 [REPLACE THIS WITH YOUR INFORMATION] 

Environment

 [REPLACE THIS WITH YOUR INFORMATION] 
lacostej added a commit to lacostej/fastlane that referenced this issue Dec 4, 2023
lacostej added a commit to lacostej/fastlane that referenced this issue Dec 4, 2023
@lacostej
Copy link
Collaborator Author

Looking at the issue again. The latest rest-client release doesn't support properly the x64-mingw-ucrt platform. There's a PR from June 2022, but it hasn't been merged.

The library appears to be unmaintained. There are some forks but none that appears to be popular enough.

We should just drop the dependency on rest-client. It is only used in 2 actions, primarily due to the ability to attach files.

  • fastlane/lib/fastlane/actions/mailgun.rb
  • fastlane/lib/fastlane/actions/upload_symbols_to_sentry.rb

Mailgun has an official ruby library that also uses rest-client. They also want to drop the dependency. Once they do, we could maybe reuse their library. Or we rewrite the action ourselves with a different transport mechanism.

The upload_symbols_to_sentry action appears to be deprecated in favor of https://github.com/getsentry/sentry-fastlane-plugin. So we should probably just remove it.

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

Successfully merging a pull request may close this issue.

1 participant