-
Notifications
You must be signed in to change notification settings - Fork 461
fix: Resolve an issue where 2019.4 would not properly run ILPP with a clean import #645
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
Changes from 2 commits
e420bd1
f409053
5e6d803
5fbc1f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,8 +11,31 @@ | |||||
|
|
||||||
| using Assembly = System.Reflection.Assembly; | ||||||
|
|
||||||
| using ILPPInterface = Unity.CompilationPipeline.Common.ILPostProcessing.ILPostProcessor; | ||||||
|
|
||||||
| namespace MLAPI.Editor.CodeGen | ||||||
| { | ||||||
| // There is a behaviour difference between 2019.4 and 2020+ codegen | ||||||
| // that essentially does checking on the existence of ILPP vs if a CodeGen assembly | ||||||
| // is present. So in order to make sure ILPP runs properly in 2019.4 from a clean | ||||||
| // import of the project we add this dummy ILPP which forces the callback to made | ||||||
| // and meets the internal ScriptCompilation pipeline requirements | ||||||
| internal sealed class HackILPPToMakeThingsWork : ILPPInterface | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recommend against using the word "Hack" in any method name.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1, let me try another name here.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like DefaultILPP the best
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to go with
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good to me! |
||||||
| { | ||||||
| public override ILPPInterface GetInstance() | ||||||
| { | ||||||
| return this; | ||||||
| } | ||||||
|
|
||||||
| public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly) | ||||||
| { | ||||||
| return null; | ||||||
| } | ||||||
|
|
||||||
| public override bool WillProcess(ICompiledAssembly compiledAssembly) => compiledAssembly.References.Any(filePath => Path.GetFileNameWithoutExtension(filePath) == CodeGenHelpers.RuntimeAssemblyName); | ||||||
|
|
||||||
| } | ||||||
|
|
||||||
| internal static class ILPostProcessProgram | ||||||
| { | ||||||
| private static ILPostProcessor[] s_ILPostProcessors { get; set; } | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.