Conversation
| } | ||
|
|
||
| [Obsolete("Use VisitCollectionElementInitializer(BoundCollectionElementInitializer node, TypeSymbol containingType, bool delayCompletionForType) instead.", true)] | ||
| private new void VisitCollectionElementInitializer(BoundCollectionElementInitializer node) |
There was a problem hiding this comment.
@cston I added it back, but I don't get what's the problem removing it. The Obsolete attribute will catch cases where this method shouldn't be used. But deleting it will also ensure that it's not used (because it doesn't exist in the first place)
I'd like to understand more what kind of issues can happen if this is removed. Thanks!
There was a problem hiding this comment.
This method hides the base class method with the same signature. I believe this method definition is intended to prevent calling the base method.
| } | ||
|
|
||
| [Obsolete("Use IsIncrementalAndFactoryContextMatches")] | ||
| private new bool IsIncremental |
| o1 OPERATOR s2, //-ObjectKIND | ||
| o1 OPERATOR o2 //-ObjectKIND" + Postfix; | ||
|
|
||
| private const string PostfixIncrementTemplate = Prefix + @" |
| Assert.Same(varI102, varC204.Interfaces()[1]); | ||
| } | ||
|
|
||
| private void TestBaseTypeResolutionHelper3(AssemblySymbol[] assemblies) |
| Assert.IsAssignableFrom<MissingMetadataTypeSymbol>(arg); | ||
| } | ||
| } | ||
| // private void TestBaseTypeResolutionHelper3(AssemblySymbol[] assemblies) |
There was a problem hiding this comment.
nit: consider commenting out with /* ... */ instead of // ... (as you did in some other tests) #Closed
|
|
||
| #if DEBUG | ||
| #if DEBUG | ||
| #pragma warning disable IDE0051 // Remove unused private members |
There was a problem hiding this comment.
Consider adding an Obsolete attribute and making the "unused member" analysis recognize the Obsolete attribute (ie. shouldn't complain). #Closed
There was a problem hiding this comment.
I'm not sure why this method would be obsolete? It can be used for debugging purposes right?
There was a problem hiding this comment.
Sure, but we don't reference it from source. Typically we invoke it from EE.
Fine to leave as-is
There was a problem hiding this comment.
If that's the case, pls consider adding a comment saying that this is invoked dynamically.
| Partial Friend Class BoundSequencePointExpression | ||
|
|
||
| #If DEBUG Then | ||
| Private Sub Validate() |
There was a problem hiding this comment.
We should probably add HasValidate="true" to BoundSequencePointExpression in VB's BoundNodes.xml instead #Closed
There was a problem hiding this comment.
Nice! I didn't know this was a thing!
src/Compilers/VisualBasic/Portable/Symbols/MissingMetadataTypeSymbol.vb
Outdated
Show resolved
Hide resolved
| { | ||
| private readonly Microsoft.CodeAnalysis.FindUsages.SourceReferenceItem _roslynSourceReferenceItem; | ||
|
|
||
| #pragma warning disable IDE0051 // Remove unused private members |
There was a problem hiding this comment.
nit: How/where is this constructor used? #Closed
There was a problem hiding this comment.
It's not used. But I don't know if F# can be calling it via reflection or something?
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 13)
|
|
||
| <!-- Use this in the event that the sequence point must be applied to expression.--> | ||
| <Node Name="BoundSequencePointExpression" Base="BoundExpression"> | ||
| <Node Name="BoundSequencePointExpression" Base="BoundExpression" HasValidate="true"> |
There was a problem hiding this comment.
@333fred @jcouv @cston This is what causing the CI failure. This is what I see in the dump
The CompileMethod call in the stack trace is attempting to compile this method:
roslyn/src/Compilers/Test/Utilities/VisualBasic/CompilationTestUtils.vb
Lines 285 to 297 in 9c4920a
What happens is:
roslyn/src/Compilers/VisualBasic/Portable/Generated/BoundNodes.xml.Generated.vb
Lines 12287 to 12291 in 9c4920a
node.Update is expecting expression.Type and type to be the same. type is originating from here:
I'm unable to investigate that further :(
| Debug.Assert(value.Type is { } && (value.Type.Equals(placeholder.Type, TypeCompareKind.AllIgnoreOptions) || value.HasErrors)); | ||
| } | ||
|
|
||
| #if DEBUG |
There was a problem hiding this comment.
This shouldn't be needed. If it's needed, that should be fixed in the analyzer. The analyzer shouldn't fire in a certain configuration for a method if the method is conditional and doesn't apply to that configuration.
There was a problem hiding this comment.
it looks like it can be removed if the callsite removed #if DEBUG too. I can make that update along with fixing the current failure (which feels a bit tricky to me :( )
There was a problem hiding this comment.
If this is deemed to be an analyzer bug, I wouldn't make a further effort than what you have to work around it here, unless the change is very straightforward.
Let's just make sure we've filed the bug in the appropriate place. It would be good to add a comment linking to the bug wherever our workaround is (in this commit, it would be above the #if DEBUG here.)
There was a problem hiding this comment.
it looks like it can be removed if the callsite removed
#if DEBUGtoo. I can make that update along with fixing the current failure (which feels a bit tricky to me :( )
Yes, but that seems like a workaround too. I feel like the analyzer should understand Conditional and not mark the member as unused if it's not even compiled.
EDIT: Oh, but the method is still compiled in release, even though it doesn't need to be.
|
Looks like there's a legitimate failure in Correctness_Build leg. |
|
@jcouv Yup. I've commented my observation, but unable to investigate further |
|
@jcouv btw, the artifacts on CI don't contain a dump. I had to run |
|
@Youssef1313 Any luck with the bootstrapping issue? I'll mark this PR as draft for now. Ping when ready for another look. Thanks |
Pull request was converted to draft
|
@jcouv Not yet. I'll revert the change causing it and open an issue for it. |
| private const int NullableContextSize = 3; | ||
|
|
||
| private const int HasDeclaredRequiredMembersOffset = NullableContextOffset + NullableContextSize; | ||
| private const int HasDeclaredRequiredMembersSize = 2; |
There was a problem hiding this comment.
This is currently unused. The next time a flag is added, this will need to be added back (so that the new flag offset will be the latest flag offset + latest flag size).
Let me know if you prefer a suppression?
There was a problem hiding this comment.
How about commenting that line out?
@cston Do you have a preference?
There was a problem hiding this comment.
Commenting the line out seems reasonable to me.
|
There still seems to be a bootstrapping issue in the correctness leg :-/ |
|
@jcouv I'll take another look to see what's going on. Converting to draft for now as I won't be able to do that soon. |
|
@jcouv CI is green now! 🎉 |
This was removed in dotnet#61064, and broke visualization of BasicBlocks. I've restored it and left a comment indicating its current use.

No description provided.