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

Source generated models should not scream on CS0618 #5229

Merged

Conversation

trejjam
Copy link
Contributor

@trejjam trejjam commented Aug 23, 2024

Hi,
when the source document contains a model that is not deprecated but contains a deprecated property, the compiler is unhappy with CS0618. This PR simply disables CS0618 in generated code

@trejjam trejjam requested a review from a team as a code owner August 23, 2024 23:02
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.
Can you please:

  • refactor the emission of pragma directives to use a constant.
  • add the corresponding pragma restore
  • update/add unit tests
  • add a changelog entry

@trejjam trejjam force-pushed the feature/do-not-scream-on-deprecated-properties branch from f151ece to df1010d Compare August 26, 2024 11:40
Copy link
Member

@baywet baywet 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 for making the changes!

@baywet baywet enabled auto-merge August 26, 2024 11:44
@trejjam
Copy link
Contributor Author

trejjam commented Aug 26, 2024

It seems there is a temporary failure in CI:
https://github.com/microsoft/kiota/actions/runs/10559055153/job/29249978326?pr=5229

@baywet baywet merged commit 76436f5 into microsoft:main Aug 26, 2024
208 checks passed
@trejjam trejjam deleted the feature/do-not-scream-on-deprecated-properties branch August 26, 2024 12:09
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.

2 participants