CycloneDX / cyclonedx-core-java

CycloneDX SBOM Model and Utils for Creating and Validating BOMs
https://cyclonedx.org/
Apache License 2.0
81 stars 59 forks source link

Fix Env vars de/serialization for formulation #486

Open mr-zepol opened 1 month ago

mr-zepol commented 1 month ago

This PR introduces key improvements following extensive testing across various scenarios.

It addresses issues with the de/serialization process for formulation, particularly in handling environment variables, which were previously inconsistent. To resolve these issues, a new class structure has been implemented that better aligns with the schema definition.

Note: This update includes some breaking changes. However, given the nature of the changes, they are unlikely to impact current usage, as no related issues have been reported thus far.

codacy-production[bot] commented 1 month ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.75% :white_check_mark: 89.47%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (dde00242ae0271e38a0e4312fad0136d801f219c) | 6033 | 4403 | 72.98% | | | Head commit (512dbce6f460ab77fb9bf010d8774951425cf0f0) | 6137 (+104) | 4525 (+122) | 73.73% (**+0.75%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#486) | 228 | 204 | **89.47%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

mr-zepol commented 3 weeks ago

Fixed Compilation Issues

nscuro commented 3 weeks ago

@mr-zepol Note: This update includes some breaking changes. However, given the nature of the changes, they are unlikely to impact current usage, as no related issues have been reported thus far.

While I technically agree, I do think we need to take semver a bit more seriously. Last time we released breaking changes in a bugfix version (by my mistake). So I'd suggest we bump the library version to 10.0.0-SNAPSHOT for this:

https://github.com/CycloneDX/cyclonedx-core-java/blob/dde00242ae0271e38a0e4312fad0136d801f219c/pom.xml#L26

WDYT?

mr-zepol commented 2 weeks ago

@mr-zepol Note: This update includes some breaking changes. However, given the nature of the changes, they are unlikely to impact current usage, as no related issues have been reported thus far.

While I technically agree, I do think we need to take semver a bit more seriously. Last time we released breaking changes in a bugfix version (by my mistake). So I'd suggest we bump the library version to 10.0.0-SNAPSHOT for this:

https://github.com/CycloneDX/cyclonedx-core-java/blob/dde00242ae0271e38a0e4312fad0136d801f219c/pom.xml#L26

WDYT?

Yes, that makes sense, so IMO what we should do is merge the other PRs we have, have a normal release, and then this one

nscuro commented 2 weeks ago

@mr-zepol Good suggestion!

mr-zepol commented 2 weeks ago

@mr-zepol Good suggestion!

So I will create smaller PRs for this one that we can merge before introducing the actual breaking changes, so we have a release with all the improvements.

codacy-production[bot] commented 2 weeks ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.31% :white_check_mark: 92.59%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (225e7bfb3e386ace86949a34a87f887597ef88bd) | 6071 | 4455 | 73.38% | | | Head commit (485826e2370be0289f6aed706d5ddc1be9127359) | 6131 (+60) | 4518 (+63) | 73.69% (**+0.31%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#486) | 162 | 150 | **92.59%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more