Skip to content

[mono] Allow missing assemblies in llvmonly+interp mode. - #64294

Merged
vargaz merged 2 commits into
dotnet:mainfrom
vargaz:llvmonly-missing-aot
Feb 6, 2022
Merged

[mono] Allow missing assemblies in llvmonly+interp mode.#64294
vargaz merged 2 commits into
dotnet:mainfrom
vargaz:llvmonly-missing-aot

Conversation

@vargaz

Copy link
Copy Markdown
Contributor

Part of the fix for #51961.

@vargaz

Copy link
Copy Markdown
ContributorAuthor

A downside of this is that it would also ignore issues when there is a mismatch between assemblies and AOT images.

@directhex

Copy link
Copy Markdown
Contributor

Do we want a different approach without that downside? A way to encode a permitted list of missing assemblies, as opposed to just being more chill about them in general?

@lambdageek

Copy link
Copy Markdown
Member

A downside of this is that it would also ignore issues when there is a mismatch between assemblies and AOT images.

Can we raise the log level from these two trace calls to a warning?

mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable because dependency %s is not found.", amodule->aot_name, amodule->image_names [index].name);
mono_error_set_bad_image_by_name (error, amodule->aot_name, "module '%s' is unusable because dependency %s is not found (error %d).\n", amodule->aot_name, amodule->image_names [index].name, status);
amodule->out_of_date= TRUE;
returnNULL;
}
if (strcmp (assembly->image->guid, amodule->image_guids [index])) {
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT: module %s is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s')).", amodule->aot_name, amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid);
mono_error_set_bad_image_by_name (error, amodule->aot_name, "module '%s' is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s')).", amodule->aot_name, amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid);
amodule->out_of_date= TRUE;
returnNULL;

@vargaz

Copy link
Copy Markdown
ContributorAuthor

An alternative would be to emit the aot image, but don't actually emit any code in it.

@lewinglewing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this for now, if there are objections lets discuss them.

@radical

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@radical

Copy link
Copy Markdown
Member

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
vargaz merged commit 5b1b341 into dotnet:mainFeb 6, 2022
@vargaz
vargaz deleted the llvmonly-missing-aot branch February 6, 2022 06:23
@ghostghost locked as resolved and limited conversation to collaborators Mar 8, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@vargaz@directhex@lambdageek@radical@lewing