Change from releasing pre compiled DLLs for each platform to releasing source files with conditional compilation flags.
Update BugsnagUnityWebRequest to remove deprecation warnings and support new PostWwwForm methods introduced in Unity 2022.2
Design
Releasing pre compiled DLLs meant that our development cycle was slow as you would have to package the SDK after every change.
It also meant we could not take advantage of unity provided compiler flags to support multiple versions, #if UNITY_2022_2_OR_NEWER for example.
With this change to shipping source files, development time and build time is reduced to a fraction of what it was in the previous setup.
Another benefit is that we can simply open up the development project in new versions of Unity and solve issues that arise on the spot using the above mentioned flags.
In theory, using this approach means that we never have to drop support for a Unity version again, obviously this would not be good for E2E CI setup, but it's a comforting thought 😄
Other benefits to this PR include:
Removed legacy/unused tests and build script features.
Greatly simplified .UnityPackage and UPM Package build process.
Simplified Unit Test setup. In the previous setup we had an entire mock UnityEngine assembly that required maintenance. This is now completely removed because the unit tests run in the Unity Editor against the real UnityEngine assembly.
Simplified dev setup means that new developers can simply install Unity and get right to work on the C# layer.
Changeset
Simplified Rakefile as dotnet compilation is no longer required.
Converted all unit tests to Unity editor mode unit tests.
Created new development project Bugsnag to allow working on the src in Unity without having to repackage the entire SDK every time you make a change.
Simplified UPM build script as package import no longer required as part of the process.
Added a permanent fix for the unity bug where MacOS bundles do not get the required meta files generated.
Added a util script that ensures all plugin files have the correct import settings on creation.
Removed unnecessary Windows packaging test as there is no longer any platform specific build factors.
Goal
BugsnagUnityWebRequest
to remove deprecation warnings and support newPostWwwForm
methods introduced in Unity 2022.2Design
Releasing pre compiled DLLs meant that our development cycle was slow as you would have to package the SDK after every change.
It also meant we could not take advantage of unity provided compiler flags to support multiple versions,
#if UNITY_2022_2_OR_NEWER
for example.With this change to shipping source files, development time and build time is reduced to a fraction of what it was in the previous setup.
Another benefit is that we can simply open up the development project in new versions of Unity and solve issues that arise on the spot using the above mentioned flags.
In theory, using this approach means that we never have to drop support for a Unity version again, obviously this would not be good for E2E CI setup, but it's a comforting thought 😄
Other benefits to this PR include:
.UnityPackage
andUPM Package
build process.Changeset
Rakefile
as dotnet compilation is no longer required.Testing
Unit tests passing and full CI run passing.