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

chore(deps): update nuget packages #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 20, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ClosedXML 0.102.2 -> 0.104.1 age adoption passing confidence
Finbuckle.MultiTenant.AspNetCore (source) 6.13.1 -> 7.0.2 age adoption passing confidence
Finbuckle.MultiTenant.EntityFrameworkCore (source) 6.13.1 -> 7.0.2 age adoption passing confidence
FluentAssertions (source) 6.8.0 -> 6.12.1 age adoption passing confidence
FluentValidation.DependencyInjectionExtensions (source) 11.9.0 -> 11.10.0 age adoption passing confidence
Hangfire (source) 1.8.12 -> 1.8.14 age adoption passing confidence
Hangfire.PostgreSql (source) 1.20.8 -> 1.20.9 age adoption passing confidence
MailKit (source) 4.5.0 -> 4.8.0 age adoption passing confidence
Microsoft.AspNetCore.Authentication.JwtBearer (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.AspNetCore.Components.Authorization (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.AspNetCore.Mvc.NewtonsoftJson (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.AspNetCore.SignalR.StackExchangeRedis (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.EntityFrameworkCore.Design (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.EntityFrameworkCore.SqlServer (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.EntityFrameworkCore.Tools (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.Extensions.Caching.StackExchangeRedis (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.Extensions.Diagnostics.HealthChecks (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.Extensions.Localization (source) 8.0.4 -> 8.0.8 age adoption passing confidence
Microsoft.Identity.Web 2.17.4 -> 3.2.0 age adoption passing confidence
Microsoft.NET.Test.Sdk 17.3.2 -> 17.11.1 age adoption passing confidence
NSwag.AspNetCore 14.0.7 -> 14.1.0 age adoption passing confidence
Npgsql.EntityFrameworkCore.PostgreSQL 8.0.2 -> 8.0.8 age adoption passing confidence
RazorEngineCore 2023.11.2 -> 2024.4.1 age adoption passing confidence
Roslynator.Analyzers 4.12.0 -> 4.12.7 age adoption passing confidence
Serilog.AspNetCore 8.0.1 -> 8.0.2 age adoption passing confidence
Serilog.Enrichers.Environment 2.3.0 -> 3.0.1 age adoption passing confidence
Serilog.Enrichers.Process (source) 2.0.2 -> 3.0.0 age adoption passing confidence
Serilog.Enrichers.Thread (source) 3.1.0 -> 4.0.0 age adoption passing confidence
Serilog.Expressions 4.0.0 -> 5.0.0 age adoption passing confidence
Serilog.Settings.Configuration 8.0.0 -> 8.0.2 age adoption passing confidence
Serilog.Sinks.Async (source) 1.5.0 -> 2.0.0 age adoption passing confidence
Serilog.Sinks.Console 5.0.1 -> 6.0.0 age adoption passing confidence
Serilog.Sinks.MSSqlServer 6.6.0 -> 7.0.1 age adoption passing confidence
Serilog.Sinks.Seq (source) 7.0.0 -> 8.0.0 age adoption passing confidence
System.Linq.Dynamic.Core (source) 1.3.10 -> 1.4.5 age adoption passing confidence
Xunit.Microsoft.DependencyInjection 6.2.18 -> 8.2.2 age adoption passing confidence
coverlet.collector 3.1.2 -> 6.0.2 age adoption passing confidence
xunit 2.4.2 -> 2.9.2 age adoption passing confidence
xunit.runner.visualstudio 2.4.5 -> 2.8.2 age adoption passing confidence

Release Notes

ClosedXML/ClosedXML (ClosedXML)

v0.104.1

Compare Source

Release notes from 0.102.1 to the 0.104.1.

Summary of breaking changes is available at docs.closedxml.io:

OpenXML SDK

OpenXML SDK has released version 3. The 0.104.0 uses it as a dependency.

XLParser replaced with ClosedParser

The XLParser has been replaced with ClosedParser. The key benefits are

  • performance - ~2μs/formula, it's likely formulas will be parseable on the demand, necessary for construction of dependency tree
  • A1/R1C1 parsing parity - both modes can be parsed with no problems
  • AST oriented - it's likely a construction of AST in memory won't even be necessary, just use AST factory to evaluate formula directly

There is also a visualizer to display AST in a browser at https://parser.closedxml.io

image

Formula Calculation

In previous version, formulas used to be calculated recursively. Each formula checked it's supporting cells for other formulas and if there were some, they were recursively evaluated. There was some logic to decrease number of evaluations. That works for a very simple cases, but isn't very good for various non-happy paths (i.e. cells weren't calculated when they should be).

This version has replaced it with a standard

  • dependency tree for checking which formulas are dirty and need to be recalculated
  • calculation chain that manages dependencies and order of formulas during calculation

For more info, see docs, the Microsoft has a page about principles Excel Recalculation
and there is one with API at docs.closedxml.io.

image

Structured references

New parser also allows a basic evaluation of structured references. Format of structured reference must use official grammar, not Excel friendly names (e.g. Pastry[@​Name] is user-friendly name for Pastry[[#This Row],[Name]]). It's now possible to

using var wb = new XLWorkbook();
var ws = wb.AddWorksheet();
ws.Cell("A1").InsertTable(new Pastry[]
{
    new("Cake", 14),
    new("Waffle", 3),
}, "Pastry");

ws.Cell("D1").FormulaA1 = "SUM(Pastry[Price])";
ws.Cell("D3").FormulaA1 = "\"Pastry \" & Pastry[[#This Row],[Name]]";
wb.RecalculateAllFormulas();

Console.WriteLine($"Expected: {17}, Actual: {ws.Cell("D1").Value}");
Console.WriteLine($"Expected: \"Pastry Waffle\", Actual: {ws.Cell("D3").Value}");

Expected: 17, Actual: 17
Expected: "Pastry Waffle", Actual: Pastry Waffle

Renaming sheet updates formulas

When a sheet is renamed, a formula referencing the sheet is also updated. This is a part of long term effort to fix effects of structural changes of a workbook. It will be a long road (e.g. sheet still delete doesn't swicth to #REF!),** but is one of basic features that should be working acorss the board.

using var wb = new XLWorkbook();
var sheet = wb.AddWorksheet();
var anotherSheet = wb.AddWorksheet("Another");
sheet.Cell("A1").FormulaA1 = "Another!B4";
anotherSheet.Name = "Changed";
Console.WriteLine(sheet.Cell("A1").FormulaA1);

Changed!B4

Workbook structure

Internal structure has been cleaned up and optimized.

The dirty tracking has been moved out of cells to formulas and thus memory taken up by a single cell value is now only 16 bytes instead of 24 (?) bytes in 0.102. Of course there are some other structures around that take up memory as well, but the single cell value is now 16 bytes (I hoped for 8, but not feasible with double, DateTime and TimeSpan as possible cell values - all take up 8 bytes... not enough bits).

The same string in different instances is now not duplicated, but only one instance is used. As seen on following test, it can lead to significant decrease in memory consumption. 250k rows with 10 text rows (same string, different instance): 117 MiB om 0.103 vs 325 MiB in 0.102.1.

InsertData performance

Insert 250k rows of 10 columns of text and 5 columns of numbers (gist).

Description Rows Columns Time/Memory to insert data Save workbook Total time/memory
0.103.0-beta 250 000 15 1.619 sec / 117 MiB 6.343 sec 477 MiB
0.102.1 250 000 15 7.160 sec / 325 MiB 6.676 sec 692 MiB

Loading of cells is now done through streaming

Basically workbooks with a large amount of cells should see ~15%-20% speedup (as long as there are mainly values, not styles or OLAP metadata....).

Reading the 250k from previous chapter:

Description Rows Columns Time to load data Used memory
0.103.0-beta 250 000 15 15.648 sec 236 MiB
0.102.1 250 000 15 20.460 sec 329 MiB

Of course, this includes all stuff from 0.103.0-beta. Version 0.103 never got a non-beta release.

Pivot tables

The internal structure of pivot tables, along with most other features, has been completely overhauled. This update should significantly reduce crashes when loading and saving workbooks containing pivot tables.

The main issue with the previous internal structure was that it didn't align with the structure used by OOXML. This was problematic because we need to support all valid files. As a result, we have to handle a wide range of inputs and correctly convert them to our internal structure, which is rather hard. A more clear 1:1 mapping with OOXML is much simpler and more reliable.

AutoFilter

The Autofilter feature has been revamped, which includes some API changes. Its behavior is now more closely aligned with how Excel operates. The XML documentation provides detailed explanations, and there is a dedicated documentation page. Several bugs have also been fixed.

For more details, refer to the Autofilter section of the migration guide.

Source link

Although ClosedXML still doesn't have source package (Fody static weaving causes pdb mismatch and nuget will refuse symbol package), there is a source link info in the package.

SourceLink basically takes a repository and a commit from the package and retrieves source from directly from forge (in this case GitHub).

CommonCrawl dataset

When workbook is a valid one, ClosedXML shouldn't throw on load. That is a rather high priority (more than saving or manipulation). Unfortunately, that is hard to find such areas that cause most problems.

One of activities that was going in a background is trying to use excel files around the internet (found by CommonCrawl) to evaluate how bad it is. There aren't results yet, but it is something that is going on.

What's Changed

Technical debt

Performance improvements

Features

Bugfixes

Documentation

Breaking changes

AutoFilter

Formulas

Functions

Dependencies

Fixes

Pivot tables

@renovate renovate bot added bot Created by bot dependency Update dependencies labels Apr 20, 2024
@renovate renovate bot force-pushed the renovate/nuget-packages branch 7 times, most recently from 00f83d0 to 9d3b852 Compare April 28, 2024 19:55
@renovate renovate bot force-pushed the renovate/nuget-packages branch 2 times, most recently from 6b42791 to f1c69b5 Compare May 3, 2024 18:21
@renovate renovate bot force-pushed the renovate/nuget-packages branch 3 times, most recently from ee60721 to f1c83eb Compare May 14, 2024 20:32
@renovate renovate bot force-pushed the renovate/nuget-packages branch 3 times, most recently from b26e593 to 80e0d5f Compare May 21, 2024 18:40
@renovate renovate bot force-pushed the renovate/nuget-packages branch 7 times, most recently from 44026fe to 4e0e8f1 Compare June 4, 2024 03:11
@renovate renovate bot force-pushed the renovate/nuget-packages branch 6 times, most recently from b21e5d0 to 58dc4d5 Compare June 11, 2024 07:27
@renovate renovate bot force-pushed the renovate/nuget-packages branch 3 times, most recently from cb68507 to d455efd Compare July 23, 2024 03:08
@renovate renovate bot force-pushed the renovate/nuget-packages branch 3 times, most recently from 63439b3 to 053edfb Compare August 3, 2024 06:01
@renovate renovate bot force-pushed the renovate/nuget-packages branch 3 times, most recently from f6e79e1 to 795fb02 Compare August 20, 2024 00:09
@renovate renovate bot force-pushed the renovate/nuget-packages branch 2 times, most recently from 0ddf3fe to 7de439c Compare August 22, 2024 05:15
@renovate renovate bot force-pushed the renovate/nuget-packages branch 5 times, most recently from b4416e3 to dcfdcf9 Compare September 16, 2024 10:42
@renovate renovate bot force-pushed the renovate/nuget-packages branch 7 times, most recently from 125efd0 to 7f4e828 Compare September 27, 2024 11:03
@renovate renovate bot force-pushed the renovate/nuget-packages branch 4 times, most recently from 1e5d1a4 to 2f05e03 Compare September 30, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot Created by bot dependency Update dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants