sta / sta/websocket-sharp

Library no longer supports Unity 2020 Deterministic builds

Open
#621 3 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hey there!

Thought I'd mention that for the longest time we have built our Unity projects with this library for WebGL. We notice that with Unity's latest 2020.1B16(Beta) they appear to be adding further support for deterministic builds. Upon opening Unity, it defaults to have these builds as enabled and throws an immediate error:

Assets\BrainCloud\UnityWebSocketsForWebGL\WebSocketSharp\AssemblyInfo.cs(20,28): error CS8357: The specified version string contains wildcards, which are not compatible with determinism.

We have determined it is caused by your use of the * in the line:
[assembly: AssemblyVersion("1.0.2.*")]

"*" syntax is variable so it is incompatible with deterministic builds.

A simple fix for people looking to make deterministic builds would be to remove the star and using a specific build or revision like [assembly: AssemblyVersion("1.0.2.1")] or [assembly: AssemblyVersion("1.0.2")] but what are the implications of doing a fix like this?

We have a plugin that needs to support both non-deterministic and deterministic builds, so we're just looking for whatever advice you may have, or safe fixes we could apply. Regardless, the information that Unity is going in this direction may come of use to you!

Thanks for your time!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Assets\BrainCloud\UnityWebSocketsForWebGL\WebSocketSharp\AssemblyInfo.cs line 20 and reproduce the Unity 2020.1B16 deterministic WebGL build error. Review how AssemblyVersion is defined and determine a compatible fixed-version change that preserves support for both deterministic and non-deterministic builds. Done means the reported error no longer occurs for the stated Unity plugin use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
build-system, game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.