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

deprecated attribute #5142

Merged
merged 7 commits into from
Oct 3, 2023
Merged

deprecated attribute #5142

merged 7 commits into from
Oct 3, 2023

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Sep 25, 2023

Description

This PR is part of #4794. It is the minimum implementation for deprecation. Pretty much only what was needed for deprecating U256.

It also minimally implements #[allow(deprecated)].

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@xunilrj xunilrj changed the title deprecated attribute warning for struct instantiation deprecated attribute Sep 25, 2023
@xunilrj xunilrj mentioned this pull request Sep 25, 2023
19 tasks
@xunilrj xunilrj requested a review from a team September 27, 2023 08:13
@xunilrj xunilrj marked this pull request as ready for review September 27, 2023 09:43
@xunilrj
Copy link
Contributor Author

xunilrj commented Sep 27, 2023

Reminder to ping #4779 when this is merged.

IGI-111
IGI-111 previously approved these changes Sep 29, 2023
@IGI-111 IGI-111 requested a review from a team September 29, 2023 17:10
ironcev
ironcev previously approved these changes Sep 29, 2023
Copy link
Member

@ironcev ironcev left a comment

Choose a reason for hiding this comment

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

Nice minimal implementation of deprecated! Just a few minor remarks from my side but otherwise LGTM

sway-core/src/transform/attribute.rs Show resolved Hide resolved
sway-core/src/transform/attribute.rs Outdated Show resolved Hide resolved
@ironcev
Copy link
Member

ironcev commented Sep 29, 2023

Since the UsingDepricated warning is brand new providing Diagnostic for it from the beginning will save us effort down the road. @xunilrj If you are find with that I can add it.

@xunilrj xunilrj dismissed stale reviews from IGI-111 and ironcev via 4a518a1 October 3, 2023 08:03
@xunilrj
Copy link
Contributor Author

xunilrj commented Oct 3, 2023

Since the UsingDepricated warning is brand new providing Diagnostic for it from the beginning will save us effort down the road. @xunilrj If you are find with that I can add it.

I can do it. Do we have a guide I can follow?
I will merge this PR and create a new one, just to finish this.

@xunilrj xunilrj force-pushed the xunilrj/deprecated_attribute branch from 4a518a1 to ff2f531 Compare October 3, 2023 08:05
@xunilrj xunilrj enabled auto-merge (squash) October 3, 2023 08:05
@xunilrj xunilrj requested review from ironcev and IGI-111 October 3, 2023 08:20
@ironcev
Copy link
Member

ironcev commented Oct 3, 2023

I can do it. Do we have a guide I can follow?

Great thanks! The guidelines are at the moment only in the RFC: https://github.com/FuelLabs/sway-rfcs/blob/master/rfcs/0011-expressive-diagnostics.md#wording-guidelines

I'll bring them into the sway-error README.md and expand with examples.

It is also good to take existing warnings in the impl ToDiagnostics as examples.

Let me know if you have questions. We will all anyhow need a bit of practice there 😄

@xunilrj xunilrj merged commit 32582e0 into master Oct 3, 2023
@xunilrj xunilrj deleted the xunilrj/deprecated_attribute branch October 3, 2023 11:11
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