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

Hosting policy on casing resolution is different between Linux-Mac #42334

Closed
LakshanF opened this issue Sep 16, 2020 · 3 comments · Fixed by #42879
Closed

Hosting policy on casing resolution is different between Linux-Mac #42334

LakshanF opened this issue Sep 16, 2020 · 3 comments · Fixed by #42879
Assignees
Milestone

Comments

@LakshanF
Copy link
Contributor

Description

Changing the casing on an App assembly has different behavior in Linux & Mac in that deleting the .deps.json file and changing the case of the App assembly (ex. App.dll to app.dll) causes the app to fail in Linux and to pass in Mac (ex. run App.exe)

Given the underlying OS behavior for case comparison is similar in both, investigate this difference further and adjust the below test cases accordingly.

The following 3 tests in src\installer\tests\HostActivation.Tests\DependencyResolution\ResolveComponentDependencies.cs tracks the scenarios for all platforms. Do note that these tests are currently disable in non-windows platforms until this issues is investigated

  • ComponentWithNoDependenciesCaseChangedOnAsm
  • ComponentWithNoDependenciesCaseChangedOnDepsAndAsm
  • ComponentWithNoDependenciesNoDepsCaseChangedOnAsm

Configuration

  • Which version of .NET is the code running on? .NET 6.0
  • What OS and version, and what distro if applicable? Any Linux and Mac
  • What is the architecture (x64, x86, ARM, ARM64)? x64

Regression?

No

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 16, 2020
@LakshanF LakshanF self-assigned this Sep 16, 2020
@ghost
Copy link

ghost commented Sep 16, 2020

Tagging subscribers to this area: @vitek-karas, @agocke
See info in area-owners.md if you want to be subscribed.

@LakshanF LakshanF added this to the 6.0.0 milestone Sep 16, 2020
LakshanF added a commit to LakshanF/runtime that referenced this issue Sep 16, 2020
Filed dotnet#42334 to track the linux-mac differences
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Sep 16, 2020
LakshanF added a commit that referenced this issue Sep 17, 2020
* Harden AssemblyDependencyResolver assemblyPaths  AssemblyDependencyResolver is made resilience to the case where  hostpolicy.dll returns the same assembly paths by ignoring multiple  entries. This is done by using OrdinalIgnoreCase comparison on Windows and Ordinal comparison elsewhere  Fix #37162

* Pick the first simple assembly for multiples

AssemblyDependencyResolver is made resilience to the case when
hostpolicy.dll returns multiple assembly paths for the same assembly
by picking the first one.

Fix #37162

* missed an extra line

* Test case for casing change with the same assembly

* typo

* Disabled the tests for non-windows

Filed #42334 to track the linux-mac differences

Co-authored-by: Lakshan Fernando <[email protected]>
@jkotas
Copy link
Member

jkotas commented Sep 17, 2020

Given the underlying OS behavior for case comparison is similar in both

macOS has case-insensitive file system by default. https://www.bing.com/search?q=macOS%20case%20insensitive%20file%20system

LakshanF added a commit to LakshanF/runtime that referenced this issue Sep 30, 2020
LakshanF added a commit that referenced this issue Sep 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants