Skip to content

Typealias CryptoKitError #285

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Typealias CryptoKitError #285

wants to merge 3 commits into from

Conversation

0xTim
Copy link
Contributor

@0xTim 0xTim commented Oct 20, 2024

Provides a typealias for CryptoKitError to hide the implementation detail of CryptoKit. Resolves #274

Checklist

  • I've run tests to see all new and existing tests pass
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

If you've made changes to gyb files

  • I've run .script/generate_boilerplate_files_with_gyb and included updated generated files in a commit of this pull request

Motivation:

CryptoKit is an implementation detail on Apple platforms - this makes it clearer for users coming from other platforms

Modifications:

Added a type alias and updated documentation

Result:

[After your change, what will change.]

@0xTim 0xTim mentioned this pull request Oct 20, 2024
5 tasks
@0xTim
Copy link
Contributor Author

0xTim commented Apr 22, 2025

@Lukasa is there anything more that needs to be done on this?

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a lower-impact way of doing this would be to avoid renaming the file, and to put the typealiases in a file whose name ends in _boring.swift. That extension makes it clear to the tooling that keeps this in sync with CryptoKit that it's an extension for Crypto only, and so would ensure it's preserved over API syncs.

Does that work for you?

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.

Rename CryptoKit errors
2 participants