Improve validation messages #196
No reviewers
Labels
No Label
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Type
Breaking
Type
Documentation
Type
Enhancement
Type
Feature
Type
Report
Type
Security
Type
Suggestion
Type
Testing
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/extensions-website#196
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pr-error-messages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
<strong>
to highlight some elements of the error messages.This is marginally related to: #175.
TODO: The errors which depend on parameters cannot use and be marked safe.
This is to be tackled as a separate patch. For now they were removed from this patch.
The screengrab includes them already, but only for future reference.
My test file: __MACOSX_missing_wheel.zip
How about moving the gist of the message to the beginning of the phrase?
From:
to:
+1, updated patch
I am not sure this particular bit is a good change:
blender_manifest.toml
andtheme.xml
, that's it.We need to clearly communicate in that ticket why the error is happening and what it means:
I'm not overly concerned about this. This is such an unlikely corner case (two XMLs + __MACOSX) that I don't mind the person uploading the theme a few times until getting this right.
Specially because the only way to reliably by-pass the ___MACOSX error is by using the build command. Which in turn will already check for all the errors.
I think that it is not the only way:
using zip from command line will also work
zip theme.zip blender_manifest.toml theme.xml
Tests need to be updated:
cc65bdd4e9
to3a811a5002
@Oleg-Komarov I updated the patch. I think we can leave the refactoring of the parsing logic as a separate patch.
Which means this patch could get in as it is without changing the error message for missing_wheel and forbidden_filepaths.
WIP: Improve validation messagesto Improve validation messages@ -177,0 +176,4 @@
found_forbidden_filepaths = find_forbidden_filepaths(file_list)
# Special treatment for Mac, so the same problem (__MACOSX folders) doesn't lead to two errors showing.
if type_slug == 'theme' and '__MACOSX/' not in found_forbidden_filepaths:
let's restructure this check a bit to prevent possible confusion in the future:
i.e. let's move the
and '__MACOSX/' not in found_forbidden_filepaths
part to theif len(list(theme_xmls)) != 1
lineand it's better to move the
found_forbidden_filepaths
logic closer to the variable declaration - i.e. let's move the whole block up, not just the variable declaration@Oleg-Komarov done
🚢