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

Fixed generated AutoMockable compilation issue due to generated variable names containing & character. Added support for existential any for throwable errors. #1263

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

pocketal
Copy link
Contributor

  1. fixed generated AutoMockable compilation issue due to generated variable names containing & character.
  2. added support for existential any for throwable errors.

@art-divin
Copy link
Collaborator

Thank you for finding the issue and creating the PR.

Don't forget to update Linux-specific files as well 👍🏻 - details in #1253

@art-divin
Copy link
Collaborator

There are test failures, both on macOS and Linux, on macOS - AutoMockable_template__generates_expected_code - most likely TemplateSpec of some sort has a test which uses files you've modified (cannot be more specific at the moment).
On linux - QuickSpec.AutoMockable template, generates expected code. Seems to be the same test which fails.

For information, you could run unit tests locally in Xcode on macOS to see the failure and debug, if needed.

That being said, I see the change:

internal extension AutoCasesEnum {
  static let count: Int = 4
  static let allCases: [AutoCasesEnum] = [
    .north,
    .south,
    .east,
    .west
  ]
}
public extension AutoCasesHasAssociatedValuesEnum {
  static let count: Int = 2
}
internal extension AutoCasesOneValueEnum {
  static let count: Int = 1
  static let allCases: [AutoCasesOneValueEnum] = [
    .one
  ]
}

which does not make much sense to be frank. Could you please double check and maybe revert this part?
Aside that, again, thank you for your contributions 👍🏻

…riable names containing & character.

2. added support for existential any for throwable errors.
@pocketal
Copy link
Contributor Author

It's strange indeed I have the save test result with or without the changes.
I revert

@art-divin art-divin merged commit 7b8f592 into krzysztofzablocki:master Jan 23, 2024
2 checks passed
art-divin pushed a commit that referenced this pull request Mar 17, 2024
…riable names containing & character. (#1263)

2. added support for existential any for throwable errors.

Co-authored-by: Aliou SARR <aliou.sarr@adevinta.com>
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 this pull request may close these issues.

3 participants