-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fix zap-gui and add zap-install #579
base: master
Are you sure you want to change the base?
Conversation
scripts/west/zap_gui.py
Outdated
was_updated = update_zcl_in_zap(zap_file_path, zcl_json_path, app_templates_path) | ||
if args.cache and was_updated: | ||
log.wrn("ZCL file path in the ZAP file has been updated. The ZAP cache must be cleared to use it.") | ||
if zap_file_path is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? If someone provides zap_file_path manually, the zcl path inside it must be updated as well. Otherwise, the Zap tool gets the wrong paths, and, for example, new clusters are not taken into account. Moreover, I don't see an advantage of using this script outside the sample's directory. Our documentation is about this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because currently it just fails and print traceback. You can still open specific file when provided path with -z
argument.
I added this to just ignore the ZAP file if it's not found and open the GUI. Please see Damian's comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is if someone wants to open zap GUI externally, not from the sample's directory and zap file doesn't exist, then adding zcl path won't work. So, it is ok, but we should add a note to the guide for that because it may lead to problems. Alternatively, what seems better, we should prevent using the --zcl
argument if we call without providing a zap file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adigie I think you can restore the previous version and just not support this use case anymore. I might have missed that this command got more complex and is now doing more than a single thing, so maybe let's not complicate it further :). Sorry for the confusion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored previous version, west zap-gui
will print ERROR: ZAP file not found!
and exit if it finds no ZAP file.
Log error and return if ZAP file was not found Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Add west command to install ZAP Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
No description provided.