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

Split NuGet package into few child packages to ease dependencies #76

Open
abatishchev opened this issue Mar 28, 2017 · 14 comments
Open

Comments

@abatishchev
Copy link
Member

The idea is to extract few child packages:

  • JwtNet.Json.NewtonSoft for JsonNet based implementation of Json (de)serialization
  • JwtNet.Json.ServiceStack for ServiceStack.Text based implementations
  • JwtNet.Cryptography.RS256 for System.Security.Cryptography based implementation of RS256Algorithm
@nbarbettini
Copy link
Contributor

I like this idea, because it will mean that the "base" functionality can exist in a package that supports the widest number of platforms/devices. The only thing to figure out is how to structure the package graph to be both flexible and have easy discoverability.

For example, if you do install-package JWT, should you get JWT.Json.Newtonsoft automatically? It would be less confusing if you did, but if it's declared as a dependency of JWT, you won't be able to remove it.

One solution I've used in the past is to push all of the interfaces (and maybe base functionality) into a package called JWT.Abstractions or JWT.Core, and then make the top-level JWT package just be an empty metapackage that serves as an easy target for discoverability. That would look like:

JWT (empty package, just dependencies)
  - depends on JWT.Abstractions
  - depends on JWT.Json.Newtonsoft
    - depends on JWT.Abtractions

So, install-package JWT gives you the default packages. If you want to customize the installation, you can skip JWT and install JWT.Abtractions directly plus whatever supporting packages you want.

Any thoughts?

@abatishchev
Copy link
Member Author

Sounds like a plan! I would just avoid calling it Core to avoid confusion with .NET Core. At work I usually call such project Contracts but we can make up something different.

Should we bump major version to 3.x since it'll be one more big breaking change.

@abatishchev abatishchev added this to the 3.0 milestone Apr 3, 2017
@nbarbettini
Copy link
Contributor

I would just avoid calling it Core to avoid confusion with .NET Core

Agreed 😄

Should we bump major version to 3.x since it'll be one more big breaking change.

I'm fine with that, would you want to fully drop the old static interface too?

@abatishchev
Copy link
Member Author

Yes, I think that would be the right time to do it.

@zemien
Copy link
Contributor

zemien commented Apr 19, 2017

This looks like a great, easy-to-use library. I notice @abatishchev has started porting it to .Net Standard. Is there anything I can help with that process? I need something similar for my .Net Core project and I would rather help get this production-ready than do my own personal fork.

@abatishchev
Copy link
Member Author

hi @zemien, the port is done (committed but not published yet). hey @nbarbettini, can you please pack and push to nuget?

@nbarbettini
Copy link
Contributor

@zemien see the latest prerelease version (3.x series) on NuGet. That supports .NET Standard already. 👍

@zemien
Copy link
Contributor

zemien commented May 7, 2017 via email

@nbarbettini
Copy link
Contributor

Is this still something you'd like @abatishchev?

@abatishchev
Copy link
Member Author

I'd park this since it seems there is no demand on implementations other than Json.Net. When/if such demand will be called out, we can come back on this. What do you think? Makes sense?

@abatishchev abatishchev modified the milestones: 4.0, 3.0 Jul 8, 2017
@nbarbettini
Copy link
Contributor

When/if such demand will be called out, we can come back on this. What do you think? Makes sense?

Yep, I agree. Doesn't seem to be a strong need to do this right away.

@carlittle
Copy link

I ended up forking this and creating my own build. I had a need to use a Newtonsoft.Json that was no higher than 6.0.8 due to other dependencies on it. The easiest way for me to do that was to not get the package from NuGet and buidl it myself. I also built it with .NET 4.5.

The build was painless. Just changed the version of Newtonsoft that I was using and compiled without a hitch.

@abatishchev
Copy link
Member Author

Do you know how to specify the minimal version of a dependency when you don't have nuspec but Core project file? I'd love to put Json.Net v6.0.3 as the dependency. Currently it puts referenced version by default and we didn't find a way to change that.

@jwt-dotnet jwt-dotnet deleted a comment from psylenced Nov 2, 2017
@jwt-dotnet jwt-dotnet deleted a comment from psylenced Nov 2, 2017
@abatishchev abatishchev removed this from the 4.0 milestone Mar 22, 2018
@abatishchev
Copy link
Member Author

No plans to implement this due to no demand

@abatishchev abatishchev reopened this May 19, 2020
@abatishchev abatishchev changed the title Split NuGet package into few child packages to ease dependencies, lower minimum target framework Split NuGet package into few child packages to ease dependencies Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants