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

Dependency review to enable optimisations. #1811

Closed
thompson-tomo opened this issue May 6, 2024 · 6 comments · Fixed by #1812
Closed

Dependency review to enable optimisations. #1811

thompson-tomo opened this issue May 6, 2024 · 6 comments · Fixed by #1812
Assignees
Milestone

Comments

@thompson-tomo
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I want to minimise dependencies in my project by utilising framework dependencies wherever possible

Describe the solution you'd like
I want System.Runtime.CompilerServices.Unsafe to only be a dependency for net standard as this will reduce maintenance effort. At the same time, i would suggest doing a review of net standard dependencies.

Describe alternatives you've considered
Accept the additional dependency

Additional context
n/a

@AArnott AArnott self-assigned this May 6, 2024
@thompson-tomo
Copy link
Contributor Author

@AArnott would you like for me to give this a first pass/attempt similar to the other PR'S we have done?

@AArnott AArnott assigned thompson-tomo and unassigned AArnott May 6, 2024
thompson-tomo added a commit to thompson-tomo/MessagePack-CSharp that referenced this issue May 6, 2024
@thompson-tomo
Copy link
Contributor Author

@AArnott i have started work on this & i am finding inconsistencies with what is on nuget.org. Could you help point me to where the packages are defined as what i am noticing is that isn't using the csproj so not sure why the deails hence dependencies are coming from.

@AArnott
Copy link
Collaborator

AArnott commented May 6, 2024

I don't understand. The referenced packages all come from nuget.org. What exactly are you seeing to create the confusion?

@thompson-tomo
Copy link
Contributor Author

When I look on nuget.org at the 2.5.140 version, I see System.Runtime.CompilerServices.Unsafe listed as a dependency however when I look at the csproj it ain't listed. Same result if I look at the latest preview. On looking at the csproj there is a property which further indicates to me that the packages are not built using csproj but something else which I can't locate

@AArnott
Copy link
Collaborator

AArnott commented May 7, 2024

That csproj does in fact create the nuget package.

The Unsafe dependency is probably because we use transitive pinning, so any transitive dependency for which we specify a version (as we do for Unsafe) ends up as a direct dependency so our nuget package can specify that version.

So if you want to remove the Unsafe dependency from the package, look for transitive routes and remove them.

@thompson-tomo
Copy link
Contributor Author

ahh, I forgot to consider how transitive dependencies are handled and as such merge request is now all updated. Thanks for the hint. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants