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

March 2024 update #276

Merged
merged 32 commits into from
Mar 29, 2024
Merged

March 2024 update #276

merged 32 commits into from
Mar 29, 2024

Conversation

adrianoc
Copy link
Owner

Fixes

766da5f fixes multiple DefaultMemberAttribute added to types with multiple overloaded indexers (#265)
4ce841f fixes local functions always being handled as static (#271)
272f865 fixes forward reference to generic types (#269)
a2b1cba generates 'constrained' opcode in the correct location, i.e, just before a call to a generic method in some scenarios (#263)
62b955f fixes forwarded references to local generic functions referencing type parameters through reflection (#268)
4769853 fix invalid code generated for 'external' (not defined in the snippet) generic method calls (#262)

Miscellaneous

62331ae display cursor position for the snippet editor (#261)
bd23eee bumps version to 2.9.0

adrianoc and others added 30 commits February 4, 2024 22:25
since we are always deploying nginx we need to configure it to forward the client IP to cecilifier server (through the
X-Forwarded-For HTTP header otherwise cecilifier server will always account nginx IP as its client
this ensures that users don´t need to run cecilifier to get the statistics
instead, find the type in the reference assemblies and return the correct assembly reference
this is done with the helper of a source generator that derives the path of the reference
assemblies from the runtime ones and creates a map from type -> assembly reference.
…in importer providers

When importing such types Cecil will end up delegating to ImportScope() which does the actual type -> assembly reference mapping
code cleanup

code cleanup
this ensures that any references to the instruction are valid after the 'move'
1. this method is garanteed to be invoked in the call path
2. also updated the call site to check for overrides
…ore a call to a generic method in some scenarios (#263)

also changes test expectations due to changes in the order of the generated code
This reverts commit b90f87e.

This call to EnsureForwardedMethod() is indeed not necessary
however, relying on the later call causes the generated
code to be harder to reason about because the generated
code ends up in the middle of the code for the method that
is making the reference.

There are plans to improve the code generation in a way that
this would not be a problem anymore; so I've decided to
postpone this cleanup (removing the extra call)
Such references were being handled as if the type was defined in an external assembly and whence being
resolved through reflection
Trying to fix an issue of coverlet not being able to show detailed line coverage
also updates test expecations for compiler generated type
accessibility that has changed from 'private' -> 'internal'
in the updated verison of Microsoft.CodeAnalysis.CSharp
Looks like one of the updated packages were pulling an assembly with types declared
in NuGet.Frameworks assembly. Somehow this namespace ended up being imported
by accident in ConstTests.cs
@adrianoc adrianoc merged commit d66833d into main Mar 29, 2024
4 of 5 checks passed
@adrianoc adrianoc deleted the staging branch March 29, 2024 16:06
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