handzlikchris / handzlikchris/FastScriptReload

Hot overload failure

オープン
#54 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

説明

FSR: HOW TO FIX - INSTRUCTIONS:

1) Open file that caused issue by looking at error log starting with: 'FSR: Compilation error: temporary files were not removed so they can be inspected: '. And click on file path to open.
2) Look up other error in the console, which will be like 'Error When updating files:' - this one contains exact line that failed to compile (in XXX_SourceCodeGenerated.cs file). Those are same compilation errors as you see in Unity/IDE when developing.
3) Read compiler error message as it'll help understand the issue

Error could be caused by a normal compilation issue that you created in source file (eg typo), in that case please fix and it'll recompile.

It's possible compilation fails due to existing limitation, in that case:

You can quickly specify custom script rewrite override for part of code that's failing.

Please use project panel to:
1) Right-click on the original file that has compilation issue
2) Click Fast Script Reload -> Add / Open User Script Rewrite Override
3) Read top comment in opened file and it'll explain how to create overrides

I'm continuously working on mitigating limitations.

If you could please get in touch with me via 'support@immersivevrtools.com' and include error you see in the console as well as created files (from paths in previous error). This way I can get it fixed for you.

You can also:
1) Look at 'limitation' section in the docs - which will explain bit more around limitations and workarounds
2) Move some of the code that you want to work on to different file - compilation happens on whole file, if you have multiple types there it could increase the chance of issues
3) Have a look at compilation error, it shows error line (in the '*.SourceCodeCombined.cs' file, it's going to be something that compiler does not accept, likely easy to spot. To workaround you can change that part of code in original file. It's specific patterns that'll break it.

*If you want to prevent that message from reappearing please go to Window -> Fast Script Reload -> Start Screen -> Logging -> tick off 'Log how to fix message on compilation error'*
UnityEngine.Logger:Log (UnityEngine.LogType,object)
ImmersiveVrToolsCommon.Runtime.Logging.LoggerScoped:LogInternal (UnityEngine.LogType,object)
ImmersiveVrToolsCommon.Runtime.Logging.LoggerScoped:LogWarning (object)
FastScriptReload.Editor.Compilation.DotnetExeDynamicCompilation:Compile (System.Collections.Generic.List`1,ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher) (at Assets/FastScriptReload/Scripts/Editor/Compilation/DotnetExeCompilator.cs:110)
FastScriptReload.Editor.Compilation.DynamicAssemblyCompiler:Compile (System.Collections.Generic.List`1,ImmersiveVRTools.Runtime.Common.UnityMainThreadDispatcher) (at Assets/FastScriptReload/Scripts/Editor/Compilation/DynamicAssemblyCompiler.cs:23)
FastScriptReload.Editor.FastScriptReloadManager/<>c__DisplayClass45_1:b__2 () (at Assets/FastScriptReload/Scripts/Editor/FastScriptReloadManager.cs:367)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Assets/FastScriptReload/Scripts/Editor/Compilation/DotnetExeCompilator.cs:110 にある報告済みのスタックトレースから始め、次に DynamicAssemblyCompiler.cs:23 と FastScriptReloadManager.cs:367 を調査します。Unity で hot reload のオーバーロード失敗を再現し、レポートに記載された生成ソースとコンソールエラーを使ってコンパイル失敗の原因を特定します。完了の条件は、原因が確認され、再現可能な修正があることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity
領域
game-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。