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

[Tooling] Make It Easier to Specify a 'zap' Instance Outside of the One in 'PATH' for 'run_zaptool.sh' #35549

Closed
gerickson opened this issue Sep 12, 2024 · 4 comments

Comments

@gerickson
Copy link
Contributor

Reproduction steps / Feature

In the the Matter documentation at https://project-chip.github.io/connectedhomeip-doc/getting_started/zap.html, it discusses running the zap tool via scripts/tools/zap/run_zaptool.sh. The run_zaptool.sh defaults to wanting to run the zap in PATH. However, if someone would like to run a zap from somewhere else, it is not easily achieved, though one could do:

ZAP_INSTALL_PATH=<parent path to zap> scripts/tools/zap/run_zaptool.sh

if the user is running a Bourne- or POSIX-compatible shell. However, the above method is not easily discoverable and is not documented outside of the run_zaptool.sh code itself.

Add a --zap option to allow specifying the name or path to a zap executable outside of the zap that might be otherwise found in PATH.

This relates to issue #35546.

Platform

other

Platform Version(s)

No response

Type

Manually tested with SDK

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

See above documentation at https://project-chip.github.io/connectedhomeip-doc/getting_started/zap.html.

@bzbarsky-apple
Copy link
Contributor

@gerickson The thing is, you could add a --zap option here, but then when you go to run codegen it would still not work because those scripts look for ZAP in either PATH or ZAP_INSTALL_PATH or ZAP_DEVELOPMENT_PATH.

There's documentation for this at https://project-chip.github.io/connectedhomeip-doc/code_generation.html#installing-zap-and-environment-variables and https://project-chip.github.io/connectedhomeip-doc/guides/BUILDING.html#which-zap-to-use, for what it's worth, but it sounds like we should consider having a single place for that and link to it from the various docs involved....

@gerickson
Copy link
Contributor Author

@bzbarsky-apple, thanks for the insights and the links.

Even for someone reasonably initiated in the technology and building embedded systems, I've found myself tripping over the documentation as I attempt to answer the question: "I am building an embedded, Linux-based Matter device, what are the series of steps (that is, the recipe) I need to undertake to do that?"

Do you anticipate opposition to adding a --zap-cli option to scripts/tools/zap/zap_execution.py which appears to execute zap-cli. It looks like, were this to move forward, I'd need to also update the documentation at docs/code_generation.md to note --zap as another option.

@bzbarsky-apple
Copy link
Contributor

@gerickson I suggest checking with @andy31415 regarding the generation scripts there.

And I agree that finding things in our documentation can be hard, and it's not very coherent. :(

gerickson added a commit to Nuovations/connectedhomeip that referenced this issue Sep 13, 2024
…to `zap` (project-chip#35549).

    * scripts/tools/zap/run_zaptool.sh

      * Display the value of 'ZAP_CMD' to standard output.

      * Add support for the `--zap` command line option to specify the `zap` executable to run.

      * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`.

    * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`.
gerickson added a commit to Nuovations/connectedhomeip that referenced this issue Sep 13, 2024
…to `zap` (project-chip#35549).

    * scripts/tools/zap/run_zaptool.sh

      * Display the value of 'ZAP_CMD' to standard output.

      * Add support for the `--zap` command line option to specify the `zap` executable to run.

      * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`.

    * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`.
gerickson added a commit to Nuovations/connectedhomeip that referenced this issue Sep 13, 2024
…to `zap` (project-chip#35549).

    * scripts/tools/zap/run_zaptool.sh

      * Display the value of 'ZAP_CMD' to standard output.

      * Add support for the `--zap` command line option to specify the `zap` executable to run.

      * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`.

    * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`.
gerickson added a commit to Nuovations/connectedhomeip that referenced this issue Sep 13, 2024
…to `zap` (project-chip#35549).

    * scripts/tools/zap/run_zaptool.sh

      * Display the value of 'ZAP_CMD' to standard output.

      * Add support for the `--zap` command line option to specify the `zap` executable to run.

      * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`.

    * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`.
mergify bot pushed a commit that referenced this issue Sep 13, 2024
…to `zap` (#35549). (#35582)

* scripts/tools/zap/run_zaptool.sh

      * Display the value of 'ZAP_CMD' to standard output.

      * Add support for the `--zap` command line option to specify the `zap` executable to run.

      * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`.

    * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`.
@gerickson
Copy link
Contributor Author

Closed with #35582.

yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this issue Dec 12, 2024
…to `zap` (project-chip#35549). (project-chip#35582)

* scripts/tools/zap/run_zaptool.sh

      * Display the value of 'ZAP_CMD' to standard output.

      * Add support for the `--zap` command line option to specify the `zap` executable to run.

      * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`.

    * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants