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

Deprecate the context initializer parameter for both MarkupConvertible and DirectiveConvertible #1175

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

Conversation

d-ronnqvist
Copy link
Contributor

Bug/issue #, if applicable:

Summary

This builds on #1168 to deprecate the context initializer parameter for both MarkupConvertible and DirectiveConvertible.

As you can see from the diff, the context was passed around quite a lot but not a single directive convertible or markup convertible type ever accessed the context other than to pass it to the initializer of other directives.

Most of these types also don't use the bundle parameter but a few does access the bundle's id, so we can't remove the bundle parameter from these protocols.


The primary reason for removing the context parameter from these protocols is that it allows for them to be created without the context being created first which in the future would them to be created before or during the context's own initialization.

Dependencies

None.

Testing

Nothing in particular. This isn't a user facing change.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added Updated tests
  • Ran the ./bin/test script and it succeeded
  • [ ] Updated documentation if necessary

@d-ronnqvist d-ronnqvist added the code cleanup Code cleanup *without* user facing changes label Mar 14, 2025
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist force-pushed the more-unused-directive-parameters branch from 5c9c181 to fdab6da Compare March 17, 2025 08:27
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Code cleanup *without* user facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant