Skip to content

Conversation

@milux
Copy link
Contributor

@milux milux commented Aug 20, 2025

Enforces namespace restrictions for all types that prohibit namespaces according to the JSON specs in https://github.com/package-url/purl-spec/tree/main/types at the time being. Selected via the following bash script:

for f in types/*.json; do
  if [[ "$(jq -r '.namespace_definition.requirement' "$f")" = 'prohibited' ]]; then
    echo "$f"
  fi
done

Further fixed the lowercased types. Identified via the following bash script and checked for "must be lowercased" note:

for f in types/*.json; do
  if [[ "$(jq -r '.namespace_definition.case_sensitive' "$f")" = 'false' ]] || [[ "$(jq -r .namespace_definition.is_case_sensitve "$f")" = 'false' ]]; then
    echo "$f"
    jq .namespace_definition.note "$f"
  fi
done

Copy link
Collaborator

@ctron ctron left a comment

Choose a reason for hiding this comment

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

This is a breaking change. So you'd need to increment the version as well. Otherwise the CI should/will fail.

@ctron
Copy link
Collaborator

ctron commented Aug 20, 2025

Just a thought: maybe it makes sense to convert the other with_ (not without) function to return Result too. Just to prevent future breaking changes on those.

@milux
Copy link
Contributor Author

milux commented Aug 20, 2025

Just a thought: maybe it makes sense to convert the other with_ (not without) function to return Result too. Just to prevent future breaking changes on those.

Good thought, also thought that. Didn't realize that there was only one function left, though. 😆
Bumped to 0.6.0-rc.1 accordingly, because API breaking change.

@milux
Copy link
Contributor Author

milux commented Aug 20, 2025

@ctron Also tried to clean up and streamline dependencies. Maybe you want to review that additional changes before merge?

@milux milux force-pushed the fix-namespace-handling branch from b1538e4 to c7672ad Compare August 20, 2025 15:49
@milux
Copy link
Contributor Author

milux commented Aug 20, 2025

@ctron One more question: Did you intentionally exclude Cargo.lock from the repo? My last commit includes it because AFAIK that harms reproducibility across developer teams.

@ctron
Copy link
Collaborator

ctron commented Aug 20, 2025

@ctron One more question: Did you intentionally exclude Cargo.lock from the repo? My last commit includes it because AFAIK that harms reproducibility across developer teams.

As this is a library, the lock file is not committed as that used to be the default. I wouldn't want to change it just for this project, and as part of this PR.

@milux
Copy link
Contributor Author

milux commented Aug 21, 2025

@ctron One more question: Did you intentionally exclude Cargo.lock from the repo? My last commit includes it because AFAIK that harms reproducibility across developer teams.

As this is a library, the lock file is not committed as that used to be the default. I wouldn't want to change it just for this project, and as part of this PR.

Good point, will undo...

@milux milux force-pushed the fix-namespace-handling branch from c7672ad to 294c13b Compare August 21, 2025 05:44
@milux milux force-pushed the fix-namespace-handling branch from 3774766 to b2e04b6 Compare August 21, 2025 05:51
@milux
Copy link
Contributor Author

milux commented Aug 25, 2025

@ctron Is the current state acceptable and can we progress to merge?

@milux
Copy link
Contributor Author

milux commented Aug 25, 2025

It would also be very helpful for https://github.com/csaf-rs/csaf to have this released as 0.6.0-rc.1 in order to include this patch there, as there are failing tests, see oasis-tcs/csaf#1057.

@helio-frota
Copy link
Contributor

@milux hi ctron is on pto

I have no gh permission to merge yet 👍

@ctron ctron added this pull request to the merge queue Sep 8, 2025
@ctron
Copy link
Collaborator

ctron commented Sep 8, 2025

@milux sorry, I was on vacation and did not update my GH busy status to make this clear.

Merged via the queue into scm-rs:main with commit a725aa0 Sep 8, 2025
9 checks passed
@milux milux deleted the fix-namespace-handling branch September 9, 2025 07:44
@milux
Copy link
Contributor Author

milux commented Sep 9, 2025

@ctron Could you please do a 0.6.0-rc.1 release?

@ctron
Copy link
Collaborator

ctron commented Sep 9, 2025

Done!

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 this pull request may close these issues.

3 participants