Hugo Bug? Warning: higher precedence data already in the data tree

I am receiving the following Warning with Hugo v0.55.6: Data for key X in path X is overridden by higher precedence data already in the data tree from .

However, it would appear that a Warning message should not be generated in this scenario as the user is purposely overriding a theme’s data file with their own version of it, as per the Hugo docs:

Data Files can also be used in Hugo themes but note that theme data files follow the same logic as other template files in the Hugo lookup order(i.e., given two files with the same name and relative path, the file in the root project data directory will override the file in the themes/<THEME>/data directory).

What’s the solution here? Change the Hugo message to Info level rather than Warning? Or is there some other approach to let the user override/customize a theme’s data file without incurring a Warning message?

@bep do you agree that the output that Hugo displays is incorrect here as enabling a user to override parts of a theme is a feature of Hugo and should not be generating Warnings?

Currently any Hugo user who attempts to override (data) files in a theme will receive Warnings when building their site…

Hence can be changed from Warning to Info/Debug level message.

PR submitted with a fix: