-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Check for <framework_name>.deps.json when enumerating framework paths #90035
Conversation
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsThis adds a check for the framework's .deps.json instead of just the existence of the directory. To avoid extra file checks in the normal/happy path (where all framework version folder are valid), when resolving, it only does the check after resolving the best version match. And if that version directory isn't valid, it tries resolving again without it. This is the framework counterpart of the check for SDK paths: #89333 Fixes #48180
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// Check that the framework's .deps.json exists. | ||
pal::string_t fx_version_dir = fx_dir; | ||
append_path(&fx_version_dir, ver.c_str()); | ||
if (!library_exists_in_dir(fx_version_dir, fx_name_local + _X(".deps.json"), nullptr)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe as a future cleanup - rename the helper as it's not about libraries... just files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will plan to do that in a future cleanup.
/backport to release/6.0-staging |
/backport to release/7.0-staging |
Started backporting to release/6.0-staging: https://github.com/dotnet/runtime/actions/runs/6175735401 |
Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/6175737271 |
@elinor-fung backporting to release/6.0-staging failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Check for <framework_name>.deps.json when enumerationg framework paths
Using index info to reconstruct a base tree...
M src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs
M src/installer/tests/HostActivation.Tests/NativeHostApis.cs
M src/installer/tests/TestUtils/DotNetBuilder.cs
M src/native/corehost/fxr/framework_info.cpp
M src/native/corehost/fxr/framework_info.h
M src/native/corehost/fxr/fx_resolver.cpp
M src/native/corehost/fxr/fx_resolver.messages.cpp
M src/native/corehost/fxr/hostfxr.cpp
Falling back to patching base and 3-way merge...
Auto-merging src/native/corehost/fxr/hostfxr.cpp
CONFLICT (content): Merge conflict in src/native/corehost/fxr/hostfxr.cpp
Auto-merging src/native/corehost/fxr/fx_resolver.messages.cpp
CONFLICT (content): Merge conflict in src/native/corehost/fxr/fx_resolver.messages.cpp
Auto-merging src/native/corehost/fxr/fx_resolver.cpp
CONFLICT (content): Merge conflict in src/native/corehost/fxr/fx_resolver.cpp
Auto-merging src/native/corehost/fxr/framework_info.h
CONFLICT (content): Merge conflict in src/native/corehost/fxr/framework_info.h
Auto-merging src/native/corehost/fxr/framework_info.cpp
CONFLICT (content): Merge conflict in src/native/corehost/fxr/framework_info.cpp
Auto-merging src/installer/tests/TestUtils/DotNetBuilder.cs
Auto-merging src/installer/tests/HostActivation.Tests/NativeHostApis.cs
CONFLICT (content): Merge conflict in src/installer/tests/HostActivation.Tests/NativeHostApis.cs
Auto-merging src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs
CONFLICT (content): Merge conflict in src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Check for <framework_name>.deps.json when enumerationg framework paths
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@elinor-fung an error occurred while backporting to release/6.0-staging, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
This adds a check for the framework's .deps.json instead of just the existence of the directory. To avoid extra file checks in the normal/happy path (where all framework version folder are valid), when resolving, it only does the check after resolving the best version match. And if that version directory isn't valid, it tries resolving again without it.
This is the framework counterpart of the check for SDK paths: #89333
Fixes #48180