Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

[Java.Interop.Tools.Cecil] Change DirectoryAssemblyResolver to allow forced loading. - #270

Merged
jonpryor merged 2 commits into
dotnet:masterfrom
dellis1972:netstandard
Mar 5, 2018
Merged

[Java.Interop.Tools.Cecil] Change DirectoryAssemblyResolver to allow forced loading.#270
jonpryor merged 2 commits into
dotnet:masterfrom
dellis1972:netstandard

Conversation

@dellis1972

Copy link
Copy Markdown
Contributor

Context dotnet/android#1154

One of the problems we currently face is that our build system
resolves ref netstandard libraries. With the current cache
system, onces an assembly has been loaded into the Cecil cache
it only ever uses that assembly. We might need to replace the
current cached version with a new one if we detect a ref and
need to reload the lib.

…forced loading.

Context dotnet/android#1154

One of the problems we currently face is that our build system
resolves `ref` netstandard libraries. With the current cache
system, onces an assembly has been loaded into the Cecil cache
it only ever uses that assembly. We might need to replace the
current cached version with a new one if we detect a `ref` and
need to reload the `lib`.
@dellis1972
dellis1972 requested a review from jonpryor March 5, 2018 10:20
@jonpryor

jonpryor commented Mar 5, 2018

Copy link
Copy Markdown
Contributor

I don't fully understand how this will be used in xamarin-android. This patch implies that "someone" will call DirectoryAssemblyResolver.Load(fileName, forceLoad:true). Who is that someone, and how are they going to obtain the second assembly to load? How will we ensure that the second assembly we're loading is in fact the correct assembly, so that we don't inadvertently replace the "real" assembly with the "reference" assembly? (If we can ensure that, then why not just do that in the first place? Then forceLoad wouldn't be needed.)

This patch raises more questions than it answers.

Then there's more thought-provoking material.

@jonpryor
jonpryor merged commit c6aa720 into dotnet:master Mar 5, 2018
jonpryor pushed a commit that referenced this pull request Mar 22, 2018
…forced loading. (#270)

Context: dotnet/android#1154
Context: dotnet/android#1356

One of the problems we currently face is that our build system
resolves `ref` netstandard libraries. With the current cache
system, onces an assembly has been loaded into the Cecil cache
it only ever uses that assembly. We might need to replace the
current cached version with a new one if we detect a `ref` and
need to reload the `lib`.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants