-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export config file warnings for deprecated options #4659
Conversation
I have a PR (Arksine/moonraker#223) that will add this to the list of warnings. As soon as its merged it will show in Mainsail, it doesn't appear that Fluidd shows warnings at the moment. It might be a good idea to render newlines so that the warnings are easier to read. Also clients might wish to check the warning list each time Klipper reports "ready" so it can update the UI if the user fixes config. Alternatively clients could just fetch Klipper's warnings directly from the configfile and create a separate section, in which case the Moonraker PR would be largely unnecessary. |
I hope you guys are prepared for the big support wave coming out of this 😊 (don't get me wrong, i like it. sooner or later people need to get rid of their legacy config) |
I'm sure there will be plenty of "what do I do" questions, but this is a pretty easy fix for the community to handle. It also gives us a chance to get people moved over before those options are invalid. The remaining holdouts on rotation distance will probably be the most difficult. It might be useful if the frontends provided a rotation distance calculator. |
don't worry most of the support questions will land on the frontend discords, where we are now trained after the first "auth enable" wave. What i would like to see is, instead a long string block with warnings some kind of list of warnings (it's already in a json why not add another layer or two). This would allow the frontend to render the warnings better also may directly hint the user to a guide. What in my opinion would help alot. Didn't discuss this with mete, but i think it is worth the effort. Atleast we could reduce some of the questions. |
i discussed this topic with @FrYakaTKoP and the best option for the guis would be a array with a object of each warning like this: [
{
type: "deprecated",
section: "gcode_macro PANELDUE_BEEP",
option: "default_parameter_frequency",
value: 1000,
message: "Option 'default_parameter_duration' in section 'gcode_macro_PANELDUE_BEEP' is deprecated."
},
{
type: "deprecated",
section: "gcode_macro PANELDUE_BEEP",
option: "default_parameter_layer_height",
value: 0.2,
message: "Option 'default_parameter_layer_height' in section 'gcode_macro_PANELDUE_BEEP' is deprecated."
}
] with this option we can integrate a translation for warnings and for the fallback we have the message itself. This is just a suggestion, we could implement the best possible output in mainsail. |
If it were possible to specify the file name of the config file containing the deprecated (or invalid) option it would probably be useful. Not sure that is easily done though, might be something to consider at a later date if the configfile module needs significant refactoring to track that |
e975359
to
da08f89
Compare
Thanks. I made some changes based on the feedback at #4659 (comment) . As recommended, -Kevin |
It might be possible to track that, but it doesn't seem to be a simple change. So, I'd recommend going forward with this smaller change before the v0.10.0 release - if desired, we can add a -Kevin |
this works fine for me! now i have to fix some deprecated options... is it possible to add the value to each option? i think it is easier for many users to understand if to find / recognize the line (as it is in their config). since from time to time certain options can be named very similar to sections. |
It's possible to include the -Kevin |
Signed-off-by: Kevin O'Connor <[email protected]>
Add a new printer.configfile.warnings with a list of config features that are deprecated. Signed-off-by: Kevin O'Connor <[email protected]>
da08f89
to
46167ca
Compare
FYI, I merged this branch. We can add additional fields in the future if desired (after the v0.10.0 release). Thanks, |
This PR will add a new
printer.configfile.warnings
entry containing a string message reporting any deprecated config options. This should be useful for warning users about needed config updates before they become errors.@Arksine , @meteyou , @cadriel - it would be great if the frontends could prominently display this information.
-Kevin