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

Swift 5 compatibility (and enum exhaustive check timeout) #87 #88

Merged
merged 1 commit into from Jan 25, 2020

Conversation

mitchins
Copy link
Contributor

@mitchins mitchins commented Jan 19, 2020

Resolves #87
Added a default case handler, and because the return type is not optional and we cannot throw inside a computed var it just does fatalError() with a message of where.
Assuming we never had this before and it IS exhaustive, the compiler just doesn't know it - it won't be an issue.

Bumped swift to 5.0 without any other changes to remove compiler warning.
Perhaps @robbiet480 is suitable reviewer?

Edit: This has been tested with a clean branch install and generates without issue or compiler warning in Xcode 11.3 and cocoa pods 1.8.4

@homeassistant
Copy link

Hello @mitchins,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

@homeassistant
Copy link

Hi @mitchins,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@mitchins
Copy link
Contributor Author

Looks like we have a credential issue on Travis?

$ bundle exec danger
694Traceback (most recent call last):
695	24: from /Users/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
696	23: from /Users/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
697	22: from /Users/travis/.rvm/gems/ruby-2.6.3/bin/danger:23:in `<main>'
698	21: from /Users/travis/.rvm/gems/ruby-2.6.3/bin/danger:23:in `load'
699	20: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/danger-4.3.5/bin/danger:5:in `<top (required)>'
700	19: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
701	18: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/danger-4.3.5/lib/danger/commands/runner.rb:66:in `run'
702	17: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/danger-4.3.5/lib/danger/danger_core/executor.rb:27:in `run'
703	16: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/danger-4.3.5/lib/danger/danger_core/dangerfile.rb:265:in `run'
704	15: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/danger-4.3.5/lib/danger/danger_core/environment_manager.rb:51:in `fill_environment_vars'
705	14: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/danger-4.3.5/lib/danger/request_sources/github/github.rb:101:in `fetch_details'
706	13: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/octokit-4.14.0/lib/octokit/client/pull_requests.rb:33:in `pull_request'
707	12: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/octokit-4.14.0/lib/octokit/connection.rb:19:in `get'
708	11: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/octokit-4.14.0/lib/octokit/connection.rb:156:in `request'
709	10: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/sawyer-0.8.2/lib/sawyer/agent.rb:94:in `call'
710	 9: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/connection.rb:138:in `get'
711	 8: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
712	 7: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
713	 6: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/request/retry.rb:128:in `call'
714	 5: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
715	 4: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
716	 3: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
717	 2: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
718	 1: from /Users/travis/.rvm/gems/ruby-2.6.3/gems/faraday-0.15.4/lib/faraday/response.rb:9:in `block in call'
719/Users/travis/.rvm/gems/ruby-2.6.3/gems/octokit-4.14.0/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/repos/home-assistant/Iconic/pulls/88: 401 - Bad credentials // See: https://developer.github.com/v3 (Octokit::Unauthorized)
720The command "bundle exec danger" failed and exited with 1 during .
721
722Your build has been stopped.

@robbiet480 any clue if we need to house-keep this?

@robbiet480
Copy link
Member

@mitchins Travis has been broken for a while now, so no worries there. PR looks good, thanks for this!

@robbiet480 robbiet480 merged commit 876be1c into home-assistant:master Jan 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The compiler is unable to check that this switch is exhaustive in reasonable time
3 participants