Skip to content

Commit

Permalink
Reconcile 2.0.1 (#3827)
Browse files Browse the repository at this point in the history
* fixes #3823 and fixes #3822 (#3824)

Co-authored-by: Chris Hanna <[email protected]>

* Fix/double asmdefs (#3825)

* Fix migrator asmdef validator

* fix git ignore not existing in unity projects

* Changelogs

* change order of git ignore init to be consistent with other locations

---------

Co-authored-by: Chris Hanna <[email protected]>

* changelog and unity cli up to 3.0.2 rc1

* 2.0.1 patch (#3826)

* Fix flawed websocket retry logic (#3815)

* attempt to fix retry logic around websocket

* we always create before we connect so move it in there

* Replaced coroutineService with _coroutineService

We are no longer passing in a coroutineService, so we should use _coroutineService instead, so the code compiles.

* Ensure we refresh the token on retry

It can be true that the websocket reconnect can happen before we make another request to refresh the token. Eventually it will refresh but adding this line here will ensure that we only get 1 websocket connection exception in that case

* let the BeamableApiRequester be fetched from DI

* update changelog

---------

Co-authored-by: ben-beamable <[email protected]>
# Conflicts:
#	client/Packages/com.beamable/CHANGELOG.md

* fix cli release date for changelog for 3.0.2

* update cli to 3.0.2

---------

Co-authored-by: Justin LeFebvre <[email protected]>
Co-authored-by: Chris Hanna <[email protected]>

* changelog and minor version

* better fix

---------

Co-authored-by: Chris Hanna <[email protected]>
Co-authored-by: gabrielbeamable <[email protected]>
Co-authored-by: Justin LeFebvre <[email protected]>
  • Loading branch information
4 people authored Dec 17, 2024
1 parent a55aeaf commit 61f1957
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 20 deletions.
5 changes: 5 additions & 0 deletions cli/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.2] - 2024-12-17

### Fixed
- Fix .gitignore not being created when passing cid/pid to the Init command

## [3.0.1] - 2024-12-09

### Fixed
Expand Down
4 changes: 4 additions & 0 deletions cli/cli/Commands/InitCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,14 @@ public override async Task<InitCommandResult> GetResult(InitCommandArgs args)

private async Task<bool> GetPidAndAuth(InitCommandArgs args, string cid, string host)
{
// [Tech_debt] This is quite hard to read, lots of duplication calls, could use some refactor, also it does way more stuff
// then just returning the pid and auth
if (!string.IsNullOrEmpty(_ctx.Pid) && string.IsNullOrEmpty(args.pid))
{
_ctx.Set(cid, _ctx.Pid, host);
_configService.SetBeamableDirectory(_ctx.WorkingDirectory);
_configService.FlushConfig();
_configService.CreateIgnoreFile();

var didLogin = await Login(args);

Expand All @@ -203,6 +206,7 @@ private async Task<bool> GetPidAndAuth(InitCommandArgs args, string cid, string
_configService.SetBeamableDirectory(_ctx.WorkingDirectory);
_configService.SetConfigString(Constants.CONFIG_PID, args.pid);
_configService.FlushConfig();
_configService.CreateIgnoreFile();
}
else
{
Expand Down
7 changes: 7 additions & 0 deletions client/Packages/com.beamable.server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.1] - 2024-12-17

### Fixed
- Shared Assembly Definitions generate with C# _LangVersion_ `9.0` instead of `8.0`.
- Shared Assembly Definitions automatically reference `Beamable.Unity.Addressables` nuget package instead of incorrectly referencing the `Unity.Addressables.dll`.
- Service migrator no longer throws exception when multiple Assembly Definitions match migration query.


## [2.0.0] - 2024-12-11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Do not add them from the custom solution file that opens from Beam Services wind
<PropertyGroup Label=""Beamable Settings"">
<!-- All Unity Assembly References must have the value: ""unity"" -->
<BeamProjectType>unity</BeamProjectType>
<LangVersion>8.0</LangVersion>
<LangVersion>9.0</LangVersion>
<GenerateClientCode>false</GenerateClientCode>
</PropertyGroup>
Expand All @@ -72,6 +72,7 @@ Do not add them from the custom solution file that opens from Beam Services wind
<!-- Nuget references -->
<ItemGroup>
<PackageReference Include=""Beamable.UnityEngine"" Version=""$(BeamableVersion)""/>
<PackageReference Include=""Beamable.UnityEngine.Addressables"" Version=""$(BeamableVersion)""/>
<PackageReference Include=""Beamable.Common"" Version=""$(BeamableVersion)""/>
<PackageReference Include=""Beamable.Microservice.Runtime"" Version=""$(BeamableVersion)""/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,32 +740,27 @@ public static MigrationPlan CreatePlan(MicroserviceReflectionCache.Registry regi
public static List<AssemblyDefinitionAsset> GetAssemblyDefinitionAssets(IDescriptor descriptor)
{
List<AssemblyDefinitionAsset> assets = new List<AssemblyDefinitionAsset>();
List<string> mandatoryReferences = new List<string>() {"Unity.Beamable.Customer.Common"}; // Add the customer common asmdef even if it's not being used

var dependencies = descriptor.Type.Assembly.GetReferencedAssemblies().Select(r => r.Name).ToList();
dependencies.AddRange(mandatoryReferences);
foreach (var name in dependencies)
{
if (CsharpProjectUtil.IsValidReference(name))
{
var guid = AssetDatabase.FindAssets($"t:AssemblyDefinitionAsset {name}");

if (guid.Length == 0)
var guids = AssetDatabase.FindAssets($"{name} t:{nameof(AssemblyDefinitionAsset)}");
AssemblyDefinitionAsset asset = null;
foreach (var id in guids)
{
continue; //there is no asset of this assembly to reference
}
var assetPath = AssetDatabase.GUIDToAssetPath(id);
var nameQuery = $"{Path.DirectorySeparatorChar}{name}.asmdef";
if (!assetPath.Contains(nameQuery))
{
continue;
}

if (guid.Length > 1)
{
throw new Exception($"Found more than one assembly definition with the name: {name}");
asset = AssetDatabase.LoadAssetAtPath<AssemblyDefinitionAsset>(assetPath);
}

var path = AssetDatabase.GUIDToAssetPath(guid[0]);

if (string.IsNullOrEmpty(path)) continue;

var asset = AssetDatabase.LoadAssetAtPath<AssemblyDefinitionAsset>(path);
if(asset != null && asset.name.Equals(name)) assets.Add(asset);
assets.Add(asset);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ System
mscorlib
SharpCompress
Unity.Timeline
Unity.Addressables*
Unity.Timeline.Editor
Unity.2D.Tilemap.Editor
Unity.Beamable
Expand Down
11 changes: 11 additions & 0 deletions client/Packages/com.beamable/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- `Party.Invite()` no longer throws a null reference exception. [#3797](https://github.com/beamable/BeamableProduct/issues/3797)


## [2.0.1] - 2024-12-17

### Changed
- Upgrade CLI to 3.0.2

### Fixed

- `WebSocketConnection` no longer throws `WebSocketConnectionException` during normal reconnect flows
- `WebSocketConnection` will use the most recent JWT to attempt reconnection
- Possible `NRE` when opening the Beamable Button while having never logged in


## [2.0.0] - 2024-12-11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ private void ButtonClicked(MouseDownEvent evt)
assistantMenuItems.Sort((mi1, mi2) =>
{
var orderComp = mi1.Order.CompareTo(mi2.Order);
var labelComp = string.Compare(mi1.RenderLabel(editorAPI).text, mi2.RenderLabel(editorAPI).text,
StringComparison.Ordinal);
var mi1Label = mi1.RenderLabel(editorAPI);
var mi2Label = mi2.RenderLabel(editorAPI);
var labelComp = 0;
if (mi1Label != null && mi2Label != null)
{
labelComp = string.Compare(mi1Label.text, mi2Label.text,
StringComparison.Ordinal);
}

return orderComp == 0 ? labelComp : orderComp;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"nugetPackageVersion": "3.0.1"
"nugetPackageVersion": "3.0.2"
}

0 comments on commit 61f1957

Please sign in to comment.