-
Notifications
You must be signed in to change notification settings - Fork 310
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(nuget)!: Split the (technology) namespace from the name #6046
Conversation
af515d3
to
1c48e14
Compare
See this for more context. Even if this would be a quite massive breaking change for existing NuGet curations, I believe it's the right thing to do, and afterwards writing (generic) NuGet curations would be much easier / possible. What do you thing @oss-review-toolkit/core-devs? |
private fun getIdentifier(name: String, version: String) = | ||
Identifier(type = "NuGet", namespace = "", name = name, version = version) | ||
internal fun getIdentifier(name: String, version: String): Identifier { | ||
val namespace = name.split('.', limit = 3).toMutableList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the splitting here should be made more strict and also require PascalCase as described in the linked article.
1c48e14
to
2235c00
Compare
2235c00
to
5975140
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #6046 +/- ##
=========================================
Coverage 68.01% 68.02%
Complexity 2023 2023
=========================================
Files 339 343 +4
Lines 16719 16723 +4
Branches 2371 2371
=========================================
+ Hits 11371 11375 +4
- Misses 4363 4364 +1
+ Partials 985 984 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -197,6 +197,13 @@ private fun List<NuGetInspector.PackageData>.toPackageReferences(): Set<PackageR | |||
) | |||
} | |||
|
|||
internal fun getIdentifierWithNamespace(name: String, version: String): Identifier { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mnonnenmacher am I correct to assume that public
access to this would be required here in order for GenerateAspNetCoreCurationsTask
et al to make use of the new logic? Or would you simply duplicate this small piece of code?
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to make it public just in case there are changes in the future. Otherwise the copy might get out of sync.
5975140
to
9d05fa0
Compare
9d05fa0
to
1a6a4fe
Compare
Separate generic Python utilities from those specific to `PythonInspector` by moving them to a dedicated file. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Move funtions that build the bridge between PythonInspector's and ORT's models to a dedicated file in order for `PythonInspector` to be independent of ORT's model for a cleaner separation. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Move funtions that build the bridge between NuGetInspector's and ORT's models to a dedicated file in order for `NuGetInspector` to be independent of ORT's model for a cleaner separation. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
1a6a4fe
to
0871063
Compare
plugins/package-managers/python/src/main/kotlin/utils/PythonInspectorExtensions.kt
Show resolved
Hide resolved
0871063
to
19fe1ec
Compare
ccea3a1
to
9864317
Compare
Use up to two namespace nodes from the name that identify the company and product / technology as defined at [1] as the namespace. This allows to write curations with empty name and version that affect a whole product / technology, and to set e.g. a concluded license for all "Microsoft.AspNetCore" packages. [1]: https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
9864317
to
22dbf21
Compare
ORT core changed the way to refer to NuGet packages [1]. Adapt for that when generating new NuGet curations. Existing NuGet curations will be migrated separately. [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
ORT core changed the way to refer to NuGet packages [1]. Adapt for that when generating new NuGet curations. Existing NuGet curations will be migrated separately. [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
This adopts to [1]. [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
This adopts to [1]. [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
This adopts to [1] by having run ort migrate --nuget-ids ort-config [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
This adopts to [1] by having run ort migrate --nuget-ids ort-config [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
This adopts to [1] by having run ort migrate --nuget-ids ort-config [1]: oss-review-toolkit/ort#6046 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Update a NuGet identifier to use a namespace as the analyzer would find it since [1]. [1]: #6046 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Update a NuGet identifier to use a namespace as the analyzer would find it since [1]. [1]: #6046 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Update a NuGet identifier to use a namespace as the analyzer would find it since [1]. [1]: #6046 Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Use up to two namespace nodes from the name that identify the company
and product / technology as defined at 1 as the namespace. This allows
to write curations with empty name and version that affect a whole product
/ technology, and to set e.g. a concluded license for all
"Microsoft.AspNetCore" packages.