Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 9, 2025 12:24
@CyrusNajmabadi CyrusNajmabadi changed the title Remmove smart rename lightup Remove smart rename lightup Dec 9, 2025
context
.Select(n => new KeyValuePair<string, ImmutableArray<(string filePath, string content)>>(n.Key, n.Value)));
smartRenameContext = ImmutableDictionary.CreateRange(
context.Select(n => KeyValuePair.Create(n.Key, n.Value.SelectMany(t => new[] { t.filePath, t.content }).ToArray())));
Copy link
Member Author

Choose a reason for hiding this comment

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

i didn't k now what to do here. It seems like the old code was just outright buggy. there is no way this was operating without throwing exceptions afaict.

Copy link
Member Author

Choose a reason for hiding this comment

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

i made it at least compile. but i have no idea what the expectation is here mapping from our ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>> to their ImmutableDictionary<string, string[]>. @akhera99 can you specify what should happen here?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are two public methods, one taking ImmutableDictionary<string, string[]> and another ImmutableArray<RenameContext> as the first parameter. source link

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, i moved to the latter.

context.Select(n => KeyValuePair.Create(n.Key, n.Value.SelectMany(t => new[] { t.filePath, t.content }).ToArray())));
_semanticContextDelay = stopwatch.Elapsed;
}
catch (Exception e) when (FatalError.ReportAndCatch(e, ErrorSeverity.Diagnostic))
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this code existed to just always catch/mask that this was always failing. i would like to remove the try/catch, but this entire model scares me a bit.

Copy link
Contributor

Choose a reason for hiding this comment

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

does it no longer catch anything after your fix?

@CyrusNajmabadi
Copy link
Member Author

@Cosifne ptal.

Copy link
Contributor

@AmadeusW AmadeusW left a comment

Choose a reason for hiding this comment

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

Overall looks good, I left couple comments.

Copy link
Member

@Cosifne Cosifne left a comment

Choose a reason for hiding this comment

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

I guess you still need to get someone else's approval because I am no longer in the team

@CyrusNajmabadi CyrusNajmabadi merged commit ebd9b19 into dotnet:main Dec 11, 2025
25 of 26 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the renameLightup branch December 11, 2025 12:19
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants