-
Notifications
You must be signed in to change notification settings - Fork 224
Conversation
Two things we discussed that require follow-up:
|
@davidfowl the two questions above are for you. @Eilon and I discussed offline |
Hah! My change caused those problem 😊 |
@davidfowl you owe @victorhurdugaci $10 plus a dozen donuts. |
@davidfowl we can make than just a dozen donuts if you answer the Eilon's two questions 😄 |
I'm wondering if we can turn of breadcrumbing for compilation purposes or move where it is done so it doesn't happen more than once? |
We can do that. It would be the same ignoring any breadcrumb add once writing has started. That leads to @Eilon 's second question: is it possible to load NuGet packages dynamically while the app is running? |
Ok here's what we need to do:
|
Are you okay with simply ignoring adds after writing has started? |
You can absolutely call Assembly.Load or write your own loader that does something similar to what we do but that's not our problem |
Yes we actually have this in the wrong layer. Everyone uses this api to reason about the dependency graph. We really shouldn't be bread crumbing anything that wouldn't get loaded. As much, it should only ever be true when the ApplicationHost runs |
Updated. No more adds after write |
@@ -72,12 +77,20 @@ public void AddBreadcrumb(string packageId, SemanticVersion packageVersion) | |||
{ | |||
return; | |||
} | |||
|
|||
_breadcrumbsToWrite.Add(new BreadcrumbInfo() | |||
|
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: remove whitespaces
bfcab9a
to
b17b3d1
Compare
Whats the deal with this? |
@victorhurdugaci, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
{ | ||
internal static class ConcurrencyUtilities | ||
public static class ConcurrencyUtilities |
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.
Why is this public?
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.
Because it is used by the package manager too. Please note that I moved the file in a different project
…don't have problems sharing - Once breadcrumb writing has started, ignore adds
b17b3d1
to
ed972d4
Compare
Fixes: #1733 and #1771
The root cause is this change:
dnx/src/Microsoft.Framework.Runtime/ExportProviders/ProjectLibraryExportProvider.cs
Line 102 in be5bb7b
Now that is it called multiple times, it can happen to run at the same time as the breadcrumb writing that that's running on a different thread.
This change will allow
Add
to be called at anytime and only throw if you try to add a new breadcrumb (one that didn't exists whenwrite
was called).Also, the change includes a lock for multi-process breadcrumb writing. It locks the breadcrumb file and doesn't allow other processes to access it while writing.
Please review: @davidfowl @pranavkm