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

feat: [SUP-2193] Runtime asembly gathering re-write for v2 parser #193

Merged
merged 6 commits into from
Nov 10, 2023

Conversation

dotkas
Copy link
Contributor

@dotkas dotkas commented Nov 9, 2023

As the open beta is gaining traction, we've discovered some inconveniences in the way we gather the dependencies from runtimepacks that caused erroneous side-effects.

The published list of .deps.json does not only contain assembly versions for the finished package, but also for any potential version that the .NET standard could encounter in a compatible environment, see this.

As we were traversing the entire list of targets, that could mean that versions with the same name would be overwritten, defeating the purpose, if System.Net.Http was encountered multiple places with different versions.

This rewrite now only looks for a specific runtimepack in the list of targets and returns only those versions, instead of everything.

Technically a breaking change, but as its beta we'll keep the major intact, as this is bound to happen more times while we test the beta amongst our customers.

Change overview

  • Dropped support for generic netstandard targets, as this will omit runtimepacks by design, and will not produce an executable anyway in case of a dotnet publish, defating the purpose
  • Re-write the runtime assembly generator to only populate with a specific runtimepack
  • Added test cases
  • Dropped the multiple RID collection of runtime assemblies, there ought to be only one
  • Removed netstandard test cases
  • Removed all committed bin/ and obj/ folders from the test fixtures, as these are generated on the fly behind the scenes anyway and have no value to the tests

@dotkas dotkas force-pushed the dotkas/SUP-2193/transitive-dep-fixes-for-v2-parsing branch from e6c0d72 to aa32a8c Compare November 9, 2023 21:42
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly this file, rest is fluff and housekeeping

@dotkas dotkas force-pushed the dotkas/SUP-2193/transitive-dep-fixes-for-v2-parsing branch from aa32a8c to bedfc0d Compare November 9, 2023 21:58
@dotkas dotkas marked this pull request as ready for review November 9, 2023 22:04
@dotkas dotkas requested a review from a team as a code owner November 9, 2023 22:04
@dotkas dotkas merged commit 3fccc8c into main Nov 10, 2023
4 checks passed
@dotkas dotkas deleted the dotkas/SUP-2193/transitive-dep-fixes-for-v2-parsing branch November 10, 2023 07:53
@snyksec
Copy link

snyksec commented Nov 10, 2023

🎉 This PR is included in version 2.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants