Skip to content

Conversation

@uschindler
Copy link
Member

This fixes #273.

The code is in early stage, but works. I added a version comparator and a comparator for bundled-signatures names. The comparator may not be the fastest, but should work correctly.

@uschindler uschindler marked this pull request as ready for review September 30, 2025 07:55
@uschindler
Copy link
Member Author

I think this is ready now, will merge soon. This improvement will allow the following:

  • If a version of a versioned bundled signature (e.g., commons-io-unsafe-x.y) is not found it will try to find the next lower version and print a warning (e.g., versions searched is "2.10.1" instead of "2.10.0")
  • If a version of a versioned bundled signature (e.g., commons-io-unsafe-x.y) is not found it will try to find the equivalent version and NOT print a warning (e.g, version searched is "2.10" instead of "2.10.0")

This allows to refer to newer commons-io versions than the ones released as bundled signatures. A warning is printed. This warning implicitely suggests to update forbiddenapis once a new version is available, but this is not clearly communicated to prevent users from opening issues and requesting new versions (hopefully).

@uschindler uschindler merged commit cf99ebe into main Sep 30, 2025
1 check passed
@uschindler uschindler deleted the dev/issue273 branch September 30, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Downgrade bundled-signatures automatically when version does not exist

2 participants