gpt4 book ai didi

ios - FaSTLane:测试 SPM 包时为 "no implicit conversion of nil into String"

转载 作者:行者123 更新时间:2023-12-05 05:48:02 25 4
gpt4 key购买 nike

我正在尝试使用 FaSTLane 在 SPM 包上运行一些测试,但我收到了一个相当模糊的错误

no implicit conversion of nil into String

我的 faSTLane 车道是这样的:

lane tests_ios do
TEST_PACKAGE_PATHS.each { |package_path|
scan(
workspace: WORKSPACE_NAME,
package_path: package_path,
devices: TEST_DEVICES_IOS,
code_coverage: true
)
}
end

我猜缺少一个参数?除了没有迹象表明到底是哪一个。

如何解决?或者至少如何获得更详细的错误消息以指明正确的方向?

这是终端的完整输出:

+------------------------------------------------+-----------------------------------------------------+
| Summary for scan 2.202.0 |
+------------------------------------------------+-----------------------------------------------------+
| workspace | MyWorkspace.xcworkspace |
| package_path | MyPackage |
| devices | ["iPhone 13 Pro Max"] |
| code_coverage | true |
| skip_detect_devices | false |
| ensure_devices_found | false |
| force_quit_simulator | false |
| reset_simulator | false |
| disable_slide_to_type | true |
| reinstall_app | false |
| clean | false |
| open_report | false |
| output_directory | ./fastlane/test_output |
| output_types | html,junit |
| buildlog_path | ~/Library/Logs/scan |
| include_simulator_logs | false |
| xcodebuild_formatter | xcpretty |
| output_remove_retry_attempts | false |
| should_zip_build_products | false |
| output_xctestrun | false |
| result_bundle | false |
| use_clang_report_name | false |
| disable_concurrent_testing | false |
| skip_build | false |
| slack_use_webhook_configured_username_and_icon | false |
| slack_username | fastlane |
| slack_icon_url | https://fastlane.tools/assets/img/fastlane_icon.png |
| skip_slack | false |
| slack_only_on_failure | false |
| xcodebuild_command | env NSUnbufferedIO=YES xcodebuild |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| number_of_retries | 0 |
| fail_build | true |
| xcode_path | /Applications/Xcode.app |
+------------------------------------------------+-----------------------------------------------------+

+------------------------------+-----------+
| Lane Context |
+------------------------------+-----------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | |
| LANE_NAME | tests_ios |
| SCAN_GENERATED_XCRESULT_PATH | |
+------------------------------+-----------+
[15:07:09]: no implicit conversion of nil into String

+------+---------------------------------------+-------------+
| fastlane summary |
+------+---------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | Switch to setup lane | 0 |
| 3 | Switch to remove_build lane | 0 |
| 4 | ([ -d build ] && rm -r build) || true | 0 |
| 5 | swiftgen | 0 |
| 💥 | scan | 0 |
+------+---------------------------------------+-------------+

[15:07:09]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

➡️ Collision between `trainer` inside Fastlane and `trainer` gem
https://github.com/fastlane/fastlane/issues/19834 [open] 2 💬
a day ago

➡️ Deliverfile api_key: connect_api/token.rb:62:in `binread': [!] no implicit conversion of nil into String
https://github.com/fastlane/fastlane/issues/19348 [closed] 2 💬
4 weeks ago

➡️ Remove XCPretty dependency and add xcbeautify as an option
https://github.com/fastlane/fastlane/pull/19629 [closed] 30 💬
5 days ago

and 91 more at: https://github.com/fastlane/fastlane/search?q=no%20implicit%20conversion%20of%20nil%20into%20String&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser.
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/scan/lib/scan/runner.rb:178:in `join': [!] no implicit conversion of nil into String (TypeError)
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/scan/lib/scan/runner.rb:178:in `find_xcresults_in_derived_data'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/scan/lib/scan/runner.rb:23:in `run'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/scan/lib/scan/manager.rb:23:in `work'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/actions/run_tests.rb:17:in `run'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:79:in `block (2 levels) in parsing_binding'
from Fastfile:78:in `each'
from Fastfile:78:in `block in parsing_binding'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/lane.rb:33:in `call'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.202.0/bin/fastlane:23:in `<top (required)>'
from /usr/local/bin/fastlane:23:in `load'
from /usr/local/bin/fastlane:23:in `<main>'

最佳答案

我想通了

scan(
package_path: package,
scheme: package,
devices: devices,
output_directory: './' + package + '/' + TEST_OUTPUT_DIR,
buildlog_path: TEST_BUILDLOG_PATH,
derived_data_path: DERIVED_DATA_PATH,
code_coverage: true,
result_bundle: true,
fail_build: false,
clean: true,
configuration: "Debug"
)

关于ios - FaSTLane:测试 SPM 包时为 "no implicit conversion of nil into String",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70879103/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com