Skip to content

Fix deprecation warnings #301

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

Merged
merged 1 commit into from
Mar 23, 2022
Merged

Conversation

neonichu
Copy link
Contributor

This fixes almost all deprecation warnings in TSC, except for the ones in IndexStoreAPIImpl. That code is using DLHandle etc which was marked as "moved to swift-driver" when being deprecated, so not sure what the right solution here is.

@neonichu
Copy link
Contributor Author

@swift-ci please test

@tomerd
Copy link
Contributor

tomerd commented Mar 22, 2022

cc @compnerd which deprecated the APIs

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Thank you! Sorry about the additional work here, I didn't think of checking within the repository itself :-(

@neonichu
Copy link
Contributor Author

@compnerd Any ideas about IndexStoreAPIImpl? That code is using DLHandle etc which was marked as "moved to swift-driver" when being deprecated, so not sure what the right solution here is. Maybe we overly eagerly deprecated it? It does seem like IndexStore is being used by SwiftPM, so we can't remove it.

@compnerd
Copy link
Member

@neonichu hmm .. DLHandle is not used anywhere else. Is there a way to prevent new users from showing up? But perhaps we just need to eat that cost for now and just hope that no new uses are introduced and un-deprecate it for the time being :-(.

@neonichu
Copy link
Contributor Author

@compnerd I'm assuming swift-driver has migrated off it by now? Maybe we can move it into IndexStore.swift and make it private?

@compnerd
Copy link
Member

Yes, swift-driver now uses a different implementation of that (assuming that there has been a snapshot). I think that the only problem with making it internal and private is ... well, its internal and private and it was public before. So technically that is a problem if you use an old version and mix and match shared libraries, etc. Basically I am worried that the ABI/API break here would be something that may be material to someone depending on the library and this change would break semver unless we did a major version bump.

@neonichu
Copy link
Contributor Author

I guess another solution would be to make an internal one that's not deprecated and let the deprecated public one call into the internal one. The issue with that is that clients inside TSCUtility could still continue to appear.

I'm not sure how worried we are about ABI/API breakage since we haven't declared a stable API so far. @tomerd wdyt?

@neonichu neonichu self-assigned this Mar 23, 2022
@tomerd
Copy link
Contributor

tomerd commented Mar 23, 2022

making it internal SGTM. we can keep a public deprecated version that wraps the internal non-deprecated types until we are ready to remove them

@tomerd
Copy link
Contributor

tomerd commented Mar 23, 2022

@neonichu is this ready to merge?

@neonichu
Copy link
Contributor Author

Yah, I think we can merge this and address the remaining deprecation warnings in a follow-up.

@neonichu neonichu merged commit 503e25f into swiftlang:main Mar 23, 2022
@neonichu neonichu deleted the fix-deprecation-warnings branch March 23, 2022 22:53
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