Skip to content

Commit

Permalink
Fixed failure on release building.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed May 1, 2024
1 parent 06a6eb6 commit 8764b62
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 12 additions & 5 deletions chibild/chibild.core/Generating/AssemblyInputFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,20 @@ private ModuleDefinition ResovleOnFallbackModule(
ModuleDefinition fallbackModule, MemberReference mr)
{
var anr = mr.Module.Assembly.Name;
if (!this.resolvedModules.TryGetValue(anr.Name, out var module))

lock (this.resolvedModules)
{
var assembly = fallbackModule.AssemblyResolver.Resolve(anr);
module = assembly.MainModule;
this.resolvedModules.Add(anr.Name, module);
if (!this.resolvedModules.TryGetValue(anr.Name, out var module))
{
lock (fallbackModule)
{
var assembly = fallbackModule.AssemblyResolver.Resolve(anr);
module = assembly.MainModule;
}
this.resolvedModules.Add(anr.Name, module);
}
return module;
}
return module;
}

public override bool TryGetType(
Expand Down
4 changes: 2 additions & 2 deletions chibild/chibild.core/Generating/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public bool ConsumeInputs(
Parallel.ForEach(inputFragments, currentFragment =>
{
if (currentFragment is ObjectInputFragment ofif &&
ofif is not ArchivedFileInputFragment)
ofif is not ArchivedObjectInputFragment)
{
this.ConsumeFragment(ofif, inputFragments);
}
Expand Down Expand Up @@ -211,7 +211,7 @@ public bool ConsumeInputs(
#else
Parallel.ForEach(inputFragments, currentFragment =>
{
if (currentFragment is ArchivedFileInputFragment afif &&
if (currentFragment is ArchivedObjectInputFragment afif &&
afif.LoadObjectIfRequired(
this.logger,
isLocationOriginSource))
Expand Down

0 comments on commit 8764b62

Please sign in to comment.