-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Bumping MSRV to 1.88.0 required us to fix uninlined_format_args throughout the codebase, e.g.
Fix from:
format!("{}", abc);
To:
format!("{abc}");
The server codegen encountered the warning in the following context:
--> pokemon-service-server-sdk/src/input.rs:813:58
|
813 | ... message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
813 - message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
813 + message: format!("Value at '{path}/events' failed to satisfy constraint: Member must not be null"),
|
This format string is rendered by a helper function like this. Therefore, it seems to take more than moving a variable name into a curly brace in the format! string.
To work around this temporarily, the server codegen allows uninlined_format_args in libRsCustomizations in ServerRequiredCustomizations. Remove this work around once the server codegen codebase is free from uninlined_format_args.
The issues were found in the following CI steps:
check-server-codegen-integration-testscheck-server-codegen-integration-tests-pythoncheck-server-e2e-testcheck-server-python-e2e-test
It's locally reproducible by removing the workaround above from libRsCustomizations and running ./gradlew codegen-server-test:test for instance.