v2.0 Discussion #871
Replies: 18 comments
-
I still believe that separating the project into multiple assemblies was a good call to make both for readability and scalability. However, I also realize that releasing multiple packages would not benefit the end user as much as I had hoped, and it might in fact be just cumbersome to deal with. My suggestion would then be to keep the current project structure, but keeping the old release strategy of a single |
Beta Was this translation helpful? Give feedback.
-
@izanhzh would you like to share your opinion? |
Beta Was this translation helpful? Give feedback.
-
Releasing multiple NuGet packages is indeed a common practice among many open-source projects. By using
This approach gives users the flexibility to choose between the full-featured package for convenience or individual packages for a lighter footprint, while maintaining the architectural benefits of separation. graph TD
MiniExcel --> MiniExcel.OpenXml
MiniExcel --> MiniExcel.Csv
MiniExcel.OpenXml --> MiniExcel.Core
MiniExcel.Csv --> MiniExcel.Core
|
Beta Was this translation helpful? Give feedback.
-
@izanhzh All of that makes sense and that's why I suggested the multiple packages strategy in the first place. The reason why I started second guessing myself is that the OpenXml functionality is not separated from the Core functionality, and effectively this is what the dependecies actually look like now: graph TD
MiniExcel --> MiniExcel.Core
MiniExcel --> MiniExcel.Csv
MiniExcel.Csv --> MiniExcel.Core
I think this still needs some thinking about in terms of how to properly structure everything, For example the Core module could contain all the abstractions other than the inaccessible mapping methods, some of which we could expose to let users create their own additional modules. Point is, I support the multiple packages strategy but I also believe it needs a bit more maturity. Again, my suggestion is making a single preview package release for now, start receiving some feedback for all the changes we've already made, and then keep working on the separation of the assemblies in a way that makes the multiple packages strategy more worthwhile for the end user. |
Beta Was this translation helpful? Give feedback.
-
We'll release new NuGet preview package tomorrow, please feel free to feedback 🐱🏍 |
Beta Was this translation helpful? Give feedback.
-
I'm not very familiar with the process of creating packages but I've read that it can be tricky to create a single package from multiple assemblies, we should make sure there are no problems with that. We should also release a new 1.x version since we've made a couple bugfixes there as well. |
Beta Was this translation helpful? Give feedback.
-
I uploaded new NuGet preview package, please feel free to check 🐱👓 |
Beta Was this translation helpful? Give feedback.
-
Looks like it's working well! |
Beta Was this translation helpful? Give feedback.
-
@shps951023 I just noticed you removed the |
Beta Was this translation helpful? Give feedback.
-
@michelebastione because .net 10 is on-preview version now, did we need .net 10 new functions? |
Beta Was this translation helpful? Give feedback.
-
Yes, this was discussed in #825. It's not a big deal though, we're gonna get |
Beta Was this translation helpful? Give feedback.
-
@michelebastione 🙌 got it, I will add it back. |
Beta Was this translation helpful? Give feedback.
-
Hi, congratulation on releasing the first preview version on NuGet. I took the liberty to fiddle with it a little. I had hoped that the new async implementation would allow me to parse Excel files in the browser. However, I run into this issue:
Which was generated by simply importing a file in a Blazor WASM app and running documentStream.QueryAsync<T>(excelType: ExcelType.XLSX); I am assuming that that MiniExcel does rely on PS. Good to note that the upgrade process to v2.0 was almost seamless, I had to remove a few lines in my wrapper class because the new implementation already returns an |
Beta Was this translation helpful? Give feedback.
-
@RiRiSharp It was a necessity for the input stream to be seekable in previous versions, but that may not be necessary anymore with our new API, at least for queries. I'll look into it. |
Beta Was this translation helpful? Give feedback.
-
@RiRiSharp this is a very simple proof of concept that currently works (given the appropriate file in input). Does it satisfy your use case? @using MiniExcelLib.Core
@page "/"
<InputFile OnChange="@FileSelected" />
@foreach (var user in _users)
{
<div @key="@user" class="my-3">
<div>Name: @user.Name</div>
<div>Points: @user.Points</div>
</div>
}
@code{
private List<User> _users = [];
private async Task FileSelected(InputFileChangeEventArgs e)
{
using var ms = new MemoryStream();
using var fs = e.File.OpenReadStream();
await fs.CopyToAsync(ms);
ms.Seek(0, SeekOrigin.Begin);
var importer = MiniExcel.Importers.GetOpenXmlImporter();
_users = importer.Query<User>(ms).ToList();
}
class User
{
public string Name { get; set; }
public decimal Points { get; set; }
}
} |
Beta Was this translation helpful? Give feedback.
-
Hey @michelebastione, thanks for your reply! I have tested your code and also found a way to make it work in v1 (listed below). So yes, this works for my use case! private async Task FileSelected(InputFileChangeEventArgs e)
{
using var ms = new MemoryStream();
using var fs = e.File.OpenReadStream();
await fs.CopyToAsync(ms);
ms.Seek(0, SeekOrigin.Begin);
var items = ms.Query<T>().ToList();
} |
Beta Was this translation helpful? Give feedback.
-
@shps951023 Given that we published the nuget package I added a tag and a release for the preview version. Should we also make a v1.x release with the bugfixes from the last couple of months? |
Beta Was this translation helpful? Give feedback.
-
@michelebastione 👍👍👍 I will update v1 NuGet before 9/16 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Our team is actively working on the development of version 2.0. If you have any suggestions or discussions, please share your idea here. 🙌
Beta Was this translation helpful? Give feedback.
All reactions