You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Cargo refuses values with hyphens or special characters in lib.name, but uses the package-name as default value, if unspecified. The package-name can contain hyphens, though. This leads to inconsistent behavior, where lib.name ends up with special characters, yet Cargo refuses specifying such values directly in the manifest.
Cargo documentation states that the default value is the package-name, but any special characters replaced by underscores. Unfortunately, Cargo never implemented this transformation, thus leading to the inconsistent behavior.
PR #12640 tried to change Cargo to allow any value as lib.name (aligning library targets with all other targets). After discussion, the recommended approach is to instead align Cargo with its documentation and actually transforming the package-name to a valid lib.name.
Currently, Cargo refuses values with hyphens or special characters in
lib.name
, but uses the package-name as default value, if unspecified. The package-name can contain hyphens, though. This leads to inconsistent behavior, wherelib.name
ends up with special characters, yet Cargo refuses specifying such values directly in the manifest.Cargo documentation states that the default value is the package-name, but any special characters replaced by underscores. Unfortunately, Cargo never implemented this transformation, thus leading to the inconsistent behavior.
PR #12640 tried to change Cargo to allow any value as
lib.name
(aligning library targets with all other targets). After discussion, the recommended approach is to instead align Cargo with its documentation and actually transforming the package-name to a validlib.name
.Related issue: #11259
The text was updated successfully, but these errors were encountered: