Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

adigie
Copy link
Member

@adigie adigie commented Mar 20, 2025

No description provided.

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:
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@Damian-Nordic Damian-Nordic Mar 21, 2025

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!

Copy link
Member Author

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.

@adigie adigie requested a review from ArekBalysNordic March 21, 2025 08:21
adigie added 2 commits March 21, 2025 10:29
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants