Skip to content

Partial implementation of #2605 for use in implementing #2594 - #2607

Closed
Kim Birkelund (kimbirkelund) wants to merge 2 commits into
microsoft:mainfrom
kimbirkelund:feature/kim/deprecation_information
Closed

Kim Birkelund (kimbirkelund) wants to merge 2 commits into
microsoft:mainfrom
kimbirkelund:feature/kim/deprecation_information

Conversation

@kimbirkelund

Copy link
Copy Markdown

I've created a (very) partial implementation of #2605. Basically it is just what I need to implement #2594.

I don't know the procedure for the different languages, so I only added for C#. I'll add for other languages too if you'd like before merging, but I'd need help to get it right.

@kimbirkelund

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@baywet Vincent Biret (baywet) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution. We're on the same page, carry on with the rest of the implementation.

@baywet

Copy link
Copy Markdown
Member

Also the other languages convert the indexer to a method since the concept only exists in c#. I'm going to add a comment on the other issue.

private static void MarkObsoleteIfDeprecationInformationIsPresent(CodeIndexer codeElement, LanguageWriter writer)
{
if (codeElement is { DeprecationInformation.Reason: { } deprecationReason })
writer.WriteLine($"""[System.Obsolete("{deprecationReason}")]""");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually here you can call this extension method if you really want to make sure it's not going to contain any invalid character

public static string CleanupXMLString(this string? original)

@baywet
Vincent Biret (baywet) marked this pull request as draft April 25, 2023 12:49
@baywet

Copy link
Copy Markdown
Member

also converting to draft for the time being to ease up triage on my end. Switch back to ready when you have a working implementation.
And we just merged a rather large PR (for TypeScript), I don't expect any conflict with your work but you might want to rebase for sanity.

@kimbirkelund

Copy link
Copy Markdown
Author

I've been ill so havn't had the energy to do anything for some days. Hopefully soon I get back to it.

However I actually intended this small change to be merged by itself. Would you prefer I get the entire feature in one PR?

@baywet

Copy link
Copy Markdown
Member

Kim Birkelund (@kimbirkelund) No rush, life has precedence over code. I'm going to be out for the remaining of the month myself :) but Andrew Omondi (@andrueastman) will help get this one merged once it's ready.
The expectation on my side was that you'd include all the changes before we get this PR merged. But if you feel the PR is getting too big and would rather get smaller increments of meaningful changes merged one at a time, that also works for us.

@kimbirkelund

Copy link
Copy Markdown
Author

Okay. I'll put it all in this PR when I got it ready then :)

@baywet

Copy link
Copy Markdown
Member

Kim Birkelund (@kimbirkelund) sorry there was a bit of a mishap on my end. Coming back from vacation I had forgotten we had an outstanding PR with preliminary work. So I started everything anew in #2795.
There everything is implemented for the deprecation information. Maybe you can start the indexer work based of that instead?
Again, apologies.

@kimbirkelund

Copy link
Copy Markdown
Author

I'm sorry too. Had completely forgot I had an open PR. We are going a different route for the project that inspired the PR, so not sure I'll get around to it any time soon.

Let's just close this PR down and I'll take a look at the rest in the future maybe. Although you shouldn't hold your breath :-)

@baywet

Copy link
Copy Markdown
Member

Am I to understand you're leaving kiota all together? If so what motivated the decision?

@kimbirkelund

Copy link
Copy Markdown
Author

We never got beyond the initial experiments. I was hoping to fix the indexer issue and maybe work around the nullable issue. But currently we're likely going to use GraphQL for the project where I was looking to introduce Kiota. But all in all the nullable issue really is the biggest blocker.

@baywet

Copy link
Copy Markdown
Member

Understood. Thanks for sharing. We'll keep that in mind as we head towards v2. (Probably at least a year down the road)

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.

Weakly typed path parameters and nullable response properties (C#)

2 participants