-
Notifications
You must be signed in to change notification settings - Fork 317
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
FIX: Avoid problems with CI and reimports #2091
Conversation
…ilding Player because scripts are compiling" if a source generated .inputactions asset is out of sync with its generated source code.
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.
Provisory approving, when the testing is done and no issues found
Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs
Show resolved
Hide resolved
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.
LGTM, things I tried checking:
- Running most of our testing scenes in the main repo (player/playmode)
- Making changes to these scenes and then running them again (player/playmode)
- Doing above while also throwing in a reimport before running them
- Doing the above again while having their input actions assets generate a C# file option on
I did not notice any issues with the testing scenes or using/saving my changes whether I had the C# option on or whether the assets were reimported recently
Description
FIX: Solves problem with CI and reimports issues by
EditorApplication.delayCall
which leads to CI build errors "Error: Scripts are compiling" when attempting to run a batch mode project via UTR when source code associated with an .inputactions asset is out of sync due to asset or code generator update.Testing status & QA
Have tested various ways to go around the problem
EditorApplication.update
,AssetDatabase.ImportAsset
etc but went withAssetDatabase.ImportAsset
which is a solution that goes straight against what previous inline comment suggested. Discussed solution with Asset Database team and no solution is good since this should use a source generator (Roslyn) for this kind of feature, but cannot be reliably setup in current Unity version. Hence this solution.Recommendation for testing is to also ensure this solution works with regular editor use (non-batch mode). Also proven by the following PR which has intentionally outdated test source asset and sample source asset: #2060
The linked PR should be closed if/when this lands.
Overall Product Risks
Comments to reviewers
Focus on corner cases and potential race conditions.
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: