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

LogicalName added for EmbeddedResource #99999

Merged
merged 4 commits into from Mar 23, 2024
Merged

LogicalName added for EmbeddedResource #99999

merged 4 commits into from Mar 23, 2024

Conversation

rzsc
Copy link
Contributor

@rzsc rzsc commented Mar 20, 2024

The test is trying to get a manifest named "test22888resources.test22888.resources" but according to the rule from https://learn.microsoft.com/en-us/dotnet/core/resources/manifest-file-names:

"If the resource file is colocated with a source file (.cs or .vb) of the same root file name, the full name of the first type that's defined in the source file is used for the manifest file name."

The resource file "test22888.resx" colocated with a C# source file "test22888.cs" so the manifest gets name after the first type defined in the C# source file (TestAssemblyLoadContext.resources).

Here is the next paragraph from the aforementioned web page:

"If a resource file is explicitly included in the project file as an EmbeddedResource item with LogicalName metadata, the LogicalName value is used as the manifest name. LogicalName takes precedence over any other metadata or setting."

To solve the problem LogicalName="test22888resources.test22888.resources" attribute has been added to EmbeddedResource item in "test22888resources.csproj" project file to make the manifest name to be as the test expects it.

The test has been removed from the tests exclusion file "./src/tests/issues.targets".

Part of #84834, cc @dotnet/samsung

Fixes #13703

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Mar 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 20, 2024
@jkotas
Copy link
Member

jkotas commented Mar 20, 2024

Test introduced by dotnet/coreclr#22925

@jkotas jkotas added area-AssemblyLoader-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Mar 20, 2024
@clamp03
Copy link
Member

clamp03 commented Mar 20, 2024

Related Issue: #13703

@jkotas
Copy link
Member

jkotas commented Mar 20, 2024

The re-enabled test is failing on Mono:

/tmp/helix/working/A93108F6/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true test22888.dll ''
Failed to unload the test assembly
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
   at Xunit.Assert.Equal[Int32](Int32 expected, Int32 actual) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 90
   at __GeneratedMainWrapper.Main()

Mono does not support collectible assemblies that this test is exercising. Could you please keep the test disabled on Mono against #34072 ? (Look for this issue number in issues.targets to find the right place where it should be disabled.

@rzsc
Copy link
Contributor Author

rzsc commented Mar 20, 2024

Mono does not support collectible assemblies that this test is exercising. Could you please keep the test disabled on Mono against #34072 ? (Look for this issue number in issues.targets to find the right place where it should be disabled.

Understood. I'm on it. Thanks!

Mono does not support collectible assemblies that this test is exercising.
@jkotas
Copy link
Member

jkotas commented Mar 21, 2024

Is this ready for review?

@rzsc rzsc marked this pull request as ready for review March 21, 2024 08:04
@clamp03
Copy link
Member

clamp03 commented Mar 21, 2024

Is this ready for review?

@jkotas I think it is ready for review. Could you review it? Thank you.

@rzsc
Copy link
Contributor Author

rzsc commented Mar 21, 2024

Is this ready for review?

@jkotas sorry for delayed reply. The PR is ready for review. Thanks!

@jkotas
Copy link
Member

jkotas commented Mar 22, 2024

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rzsc
Copy link
Contributor Author

rzsc commented Mar 22, 2024

@jkotas, I can see that some checks were not successful...
Are these failures related to my changes?
I cannot deduce it from error messages...
I can see some warnings related to the test22888, the one I have modified and enabled. Shall I fix these warnings?
Thank you for all your help!

@jkotas
Copy link
Member

jkotas commented Mar 22, 2024

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@jkotas jkotas merged commit 7dae296 into dotnet:main Mar 23, 2024
89 of 91 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-AssemblyLoader-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failed: Regressions/coreclr/GitHub_22888/test22888
6 participants