Skip to content

Commit

Permalink
Merge pull request #382 from timcassell/rel2_7_0
Browse files Browse the repository at this point in the history
v2.7.0
  • Loading branch information
timcassell committed Feb 11, 2024
2 parents e627a15 + e9e0443 commit 91c978c
Show file tree
Hide file tree
Showing 10 changed files with 192 additions and 84 deletions.
13 changes: 12 additions & 1 deletion DeveloperNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Edit `Packages/README.md` to remove the `## Package Installation` and `## Latest

For Unity Asset Store package upload:

1. Open `ProtoPromise_Unity` project in Unity 2019.4
1. Open `ProtoPromise_Unity` project in Unity 2019.4.0
2. Install "Asset Store Publishing Tools" asset from the Unity Asset Store
3. Add scripting define symbol `UNITY_ASTOOLS_EXPERIMENTAL`
4. Asset Store Tools > Asset Store Uploader
Expand All @@ -31,6 +31,17 @@ Unity version may need to be updated to use the earliest version that the Asset
Revert changes to `Packages/README.md`.


For the ProtoPromise.Analyzer package, if changes were made:

- Move rules from `AnalyzerReleases.Unshipped.md` to `AnalyzerReleases.Shipped.md`
- Build in Release
- Add `ProtoPromise.Analyzer.dll` to Unity project under `Plugins/ProtoPromise/Analyzers`
- Open Unity in 2020.2 and add the label `RoslynAnalyzer` to the dll
- Create a unitypackage from the dll and name it `ProtoPromise.Analyzer.unitypackage`
- Upload `ProtoPromise.Analyzer.unitypackage` with the release on GitHub
- Run the `Publish analyzer nuget package` workflow on GitHub with the new version.


For Debugging:

By default, ProtoPromise types are marked with the `DebuggerNonUserCodeAttribute`, making the debugger skip over the library code instead of stepping into it. To disable this behavior and to get more detailed stack traces, define the compiler symbol `PROTO_PROMISE_DEVELOPER_MODE` in Unity, or change `<DeveloperMode>` to `true` in the non-unity csproj.
26 changes: 26 additions & 0 deletions Package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Change Log

## v2.7.0 - February 11, 2024

Enhancements:

- Added `AsyncEnumerable<T>` allocation-free async iterators (requires C# 7.3 or newer).
- Added allocation-free async Linq extensions for `AsyncEnumerable<T>`.
- Added optional `ContentionStrategy` to `AsyncReaderWriterLock`.
- Added `Promise.ParallelForEachAsync` APIs to consume `AsyncEnumerable<T>` and `IAsyncEnumerable<T>` in parallel.
- Added new `Progress` APIs.
- Added `Promise.Finally` overloads accepting `Func<Promise>` delegates to support `DisposeAsync`.
- Added `PromiseYielder.{WaitForUpdate, WaitForLateUpdate}` APIs.

Fixes:

- Fixed an exception in Unity after exiting playmode with reload domain disabled.
- Fixed `AsyncLocal<T>` in `Promise.Parallel*` body.
- Fixed an error log when clearing the object pool in a rare case.

Optimizations:

- Improved performance of `async Promise` functions in netstandard2.1 and Unity 2021.2 or newer.

Deprecated:

- Deprecated old progress APIs (`Deferred.ReportProgress`, `Promise.Progress`, `Promise.AwaitWithProgress`). Replaced with new `Progress` APIs.

## v2.6.1 - October 21, 2023

Fixes:
Expand Down
189 changes: 124 additions & 65 deletions Package/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.timcassell.protopromise",
"version": "2.6.1",
"version": "2.7.0",
"displayName": "ProtoPromise",
"description": "Robust and efficient library for management of asynchronous operations.",
"changelogUrl": "https://github.com/timcassell/ProtoPromise/blob/master/Package/CHANGELOG.md",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
## Release 1.0
## Release 1.0

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|--------------------
PPAE001 | Usage | Error | await YieldAsync inside try block with a catch clause
PPAE002 | Usage | Error | await YieldAsync inside catch block
PPAE003 | Usage | Error | await YieldAsync inside finally block
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|--------------------
PPAE001 | Usage | Error | await YieldAsync inside try block with a catch clause
PPAE002 | Usage | Error | await YieldAsync inside catch block
PPAE003 | Usage | Error | await YieldAsync inside finally block

2 changes: 1 addition & 1 deletion ProtoPromise/ProtoPromise.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>net35;net40;net45;net47;netstandard2.0;netstandard2.1;netcoreapp2.1;net5.0;net6.0</TargetFrameworks>
<Configurations>Release;Debug;Release_NoProgress;Debug_NoProgress</Configurations>
<Version>2.6.1</Version>
<Version>2.7.0</Version>
<!--Set true to help debug internal promise code (allows the debugger to step into the code and includes internal stacktraces).-->
<DeveloperMode>false</DeveloperMode>
</PropertyGroup>
Expand Down
15 changes: 12 additions & 3 deletions ProtoPromise/nuget/ProtoPromise.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,28 @@
<dependency id="System.Buffers" version="4.5.1" exclude="Build,Analyzers" />
<dependency id="System.Memory" version="4.5.5" exclude="Build,Analyzers" />
<dependency id="System.Threading.Tasks.Extensions" version="4.5.4" exclude="Build,Analyzers" />
<dependency id="ProtoPromise.Analyzer" version="1.0.0" exclude="Build" />
</group>
<group targetFramework="netstandard2.0">
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" exclude="Build,Analyzers" />
<dependency id="System.Buffers" version="4.5.1" exclude="Build,Analyzers" />
<dependency id="System.Memory" version="4.5.5" exclude="Build,Analyzers" />
<dependency id="System.Threading.Tasks.Extensions" version="4.5.4" exclude="Build,Analyzers" />
<dependency id="ProtoPromise.Analyzer" version="1.0.0" exclude="Build" />
</group>
<group targetFramework="netstandard2.1">
<dependency id="ProtoPromise.Analyzer" version="1.0.0" exclude="Build" />
</group>
<group targetFramework="netstandard2.1" />
<group targetFramework="netcoreapp2.1">
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" exclude="Build,Analyzers" />
<dependency id="ProtoPromise.Analyzer" version="1.0.0" exclude="Build" />
</group>
<group targetFramework="net5.0">
<dependency id="ProtoPromise.Analyzer" version="1.0.0" exclude="Build" />
</group>
<group targetFramework="net6.0">
<dependency id="ProtoPromise.Analyzer" version="1.0.0" exclude="Build" />
</group>
<group targetFramework="net5.0" />
<group targetFramework="net6.0" />
</dependencies>

<readme>readme.md</readme>
Expand Down
9 changes: 5 additions & 4 deletions ProtoPromise/nuget/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ Robust and efficient library for management of asynchronous operations.

- Allocation-free async operations
- Cancelable operations with custom allocation-free CancelationToken/Source
- Progress with universal automatic or manual normalization
- Full causality traces
- Interoperable with Tasks and Unity's Coroutines
- Allocation-free async iterators with async Linq
- Progress with enforced normalization
- async/await support and .Then API
- Thread safe
- .Then API and async/await
- Full causality traces
- Easily switch to foreground or background context
- Combine async operations
- Circular await detection
- Interoperable with Tasks
- CLS compliant

This library was built to work in all C#/.Net ecosystems, including Unity, Mono, .Net Framework, .Net Core, UI frameworks, and AOT compilation. It is CLS compliant, so it is not restricted to only C#, and will work with any .Net language.
Expand Down
2 changes: 1 addition & 1 deletion ProtoPromiseUnityHelpers/ProtoPromiseUnityHelpers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--We target .Net Framework 3.5 to support old Unity versions, and we also target .Net Standard 2.1 to support new Unity versions, even after it drops old Framework support.-->
<TargetFrameworks>net35;netstandard2.1</TargetFrameworks>
<Configurations>Release;Debug;</Configurations>
<Version>2.6.1</Version>
<Version>2.7.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 91c978c

Please sign in to comment.