Skip to content
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: build fails on linux because of wrong dir separator #101

Conversation

PoisonousJohn
Copy link
Contributor

@PoisonousJohn PoisonousJohn commented Jun 27, 2024

Hi. We have a build failing on Linux build agents due to wrong directory separtor. Here's the fix.

PR contains some whitespace changes, if you don't mind

Example of exception

[18:44:41]E:				 [BuildPipeline.BuildPlayer()] [EXCEPTION] FileNotFoundException: Could not find file "Code/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/src\main\java\com\unity3d\player\UnityPlayerActivity.java"
[18:44:41] :				 [BuildPipeline.BuildPlayer()] FileNotFoundException: Could not find file "Code/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/src\main\java\com\unity3d\player\UnityPlayerActivity.java"
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <6b6c247d47d645b790f8ec1a6fff97f8>:0
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <6b6c247d47d645b790f8ec1a6fff97f8>:0
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00055] in <6b6c247d47d645b790f8ec1a6fff97f8>:0
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks) [0x00000] in <6b6c247d47d645b790f8ec1a6fff97f8>:0
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string,System.Text.Encoding,bool)
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at System.IO.File.InternalReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in <6b6c247d47d645b790f8ec1a6fff97f8>:0
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at System.IO.File.ReadAllText (System.String path) [0x0002c] in <6b6c247d47d645b790f8ec1a6fff97f8>:0
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at PostProcessor.ReplaceLineInFile (System.String path, System.String oldValue, System.String newValue) [0x00000] in Code/Library/PackageCache/[email protected]/Editor/PostProcessor.cs:82
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at DidomiPostProcessorGradleAndroidProject.UpdateUnityPlayerActivity (System.String path) [0x000a0] in Code/Library/PackageCache/[email protected]/Editor/PostProcessor.cs:62
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at DidomiPostProcessorGradleAndroidProject.AndroidPostProcess (System.String path) [0x00000] in Code/Library/PackageCache/[email protected]/Editor/PostProcessor.cs:27
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at DidomiPostProcessorGradleAndroidProject.OnPostGenerateGradleAndroidProject (System.String path) [0x00015] in Code/Library/PackageCache/[email protected]/Editor/PostProcessor.cs:18
[18:44:41] :				 [BuildPipeline.BuildPlayer()] at UnityEditor.Android.AndroidBuildPipelineInterfaces.OnGeneratePlatformProjectPostprocess (System.String path, System.Boolean strict) [0x00026] in /home/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/Android/AndroidPostGenerateGradleProject.cs:39

@PoisonousJohn PoisonousJohn changed the title Fix: build fails on linux beacuse of wrong dur separator Fix: build fails on linux beacuse of wrong dir separator Jun 27, 2024
@PoisonousJohn PoisonousJohn changed the title Fix: build fails on linux beacuse of wrong dir separator Fix: build fails on linux because of wrong dir separator Jun 27, 2024
@PoisonousJohn
Copy link
Contributor Author

@pmerlet-at-didomi could you please take a look?

@pmerlet-at-didomi
Copy link
Contributor

Hello @PoisonousJohn , thanks for you fix. PR looks good to me, we will make sure the change is present in the next release.
If you can remove the whitespace changes from the PR we will integrate it directly, otherwise we will cherry-pick the change from our repository.

@PoisonousJohn PoisonousJohn force-pushed the fix/directory-separator-for-linux branch 2 times, most recently from e991fcf to 057b76b Compare July 5, 2024 14:39
@PoisonousJohn PoisonousJohn force-pushed the fix/directory-separator-for-linux branch from 057b76b to a0d163d Compare July 5, 2024 14:44
@PoisonousJohn
Copy link
Contributor Author

@pmerlet-at-didomi the whitespace problem is fixed

@nicolas-chaix-didomi nicolas-chaix-didomi merged commit c97c763 into didomi:master Jul 15, 2024
@PoisonousJohn PoisonousJohn deleted the fix/directory-separator-for-linux branch July 18, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants