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

Doesn't work on macOS with big files #2

Closed
VolodymyrBS opened this issue Oct 1, 2020 · 3 comments
Closed

Doesn't work on macOS with big files #2

VolodymyrBS opened this issue Oct 1, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@VolodymyrBS
Copy link

VolodymyrBS commented Oct 1, 2020

Compiler fails to compile the file with error.

error CS1504: Source file '***/Assets/TrueSync/Physics/Farseer/Common/PhysicsLogic/RealExplosion.cs' could not be opened -- GetCPInfoExW

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo https://github.com/VolodymyrBS/CSharpCompilerSettingsForUnityBugRepro.git
  2. Import project on macOS
  3. Check Console
  4. See an error

Environment:

  • Version 1.0.1
  • Platform: Editor Mac
  • Unity version: [e.g. 2019.3.5f1]
  • Build options: any
  • Injected compiler version - 3.5.0, 3.7.0

Additional context
Probably it's related to this issue
mono/mono#12603
ILSpy shows that System.Text.Encoding.CodePages.dll library inside Microsoft.Net.Compiler package use WinApi

image

Note: Can't share the original project but only part of it enough to reproduce the error.
Note: Error will also occure if you try to directly call mono <path to downloaded csc.exe> <path to RealExplosion.cs>

@VolodymyrBS VolodymyrBS added the bug Something isn't working label Oct 1, 2020
@VolodymyrBS VolodymyrBS changed the title Doesn't work on macOS with large files Doesn't work on macOS with big files Oct 1, 2020
@mob-sakai
Copy link
Owner

@VolodymyrBS
Thank you for reporting.
The issue was reproduced in my environment.

Using Unity's built-in mono, the build was failed.

$ /Applications/Unity/Hub/Editor/2019.3.2f1/Unity.app/Contents/MonoBleedingEdge/bin/mono --version
Mono JIT compiler version 5.11.0 ((HEAD/4fbd4767c98 Mon Dec 16 02:55:50 GMT 2019)
...

$ /Applications/Unity/Hub/Editor/2019.3.2f1/Unity.app/Contents/MonoBleedingEdge/bin/mono -noconfig @rsp_test
Microsoft (R) Visual C# Compiler version 3.5.0-beta4-20153-05 (20b9af91)
Copyright (C) Microsoft Corporation. All rights reserved.

error CS1504: Source file '/Users/takashi.sakai/repos/CSharpCompilerSettingsForUnityBugRepro/Assets/TrueSync/Physics/Farseer/Common/PhysicsLogic/RealExplosion.cs' could not be opened -- GetCPInfoExW

Using the new version of mono, the build was successful.

$ mono --version
Mono JIT compiler version 6.12.0.90 (2020-02/d3daacdaa80 Thu Jul 30 16:18:06 EDT 2020)
...

$ mono -noconfig @rsp_test
Microsoft (R) Visual C# Compiler version 3.5.0-beta4-20153-05 (20b9af91)
Copyright (C) Microsoft Corporation. All rights reserved.

Assets/TrueSync/Unity/TSTransform2D.cs(87,22): warning CS0649: Field 'TSTransform2D._serialized' is never assigned to, and will always have its default value false

Response file: test_rsp

@mob-sakai
Copy link
Owner

Plans:

  • Add `Use System Mono' option

    • Pros: Simple.
    • Cons: All developers have to install mono on their machines.
  • Use self-contained csc

    • Pros: Mono is not needed to run csc.
    • Cons: Increasing the download size of csc
    • Cons: csc package needs to be rebuilt.

@mob-sakai
Copy link
Owner

Fixed in 1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants