Re: [Zephyr-users] Introducing west, Zephyr's meta-tool


Carles Cufi
 

Hi Luiz,

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Luiz Augusto von Dentz
Sent: 28 January 2019 21:00
Subject: Re: [Zephyr-devel] [Zephyr-users] Introducing west, Zephyr's
meta-tool

Hi Carles,

How about pull request, how does west deals with them? Or it doesn't and
which case we have to deal with individual git repositories and issue
git push ourselves? This looks like repo which I never liked.
You can see that dealing with Pull Requests is listed as an unresolved issue in the description here:
https://github.com/zephyrproject-rtos/zephyr/issues/6770

There are several possibilities to deal with this, but first and since that you mention Google repo let me make an important distinction. With repo you typically (though not always) track the tip of master on multiple repositories. With west, although that is also possible, we will require specific SHAs for all repos (projects) that are not the main zephyr repo (i.e. the manifest repo).

Options we have (informally, in calls and chats) considered:
1. Send 2 PRs to the 2 repos affected (say for example zephyr + mbedtls), where the branch name used matches. Then CI running in zephyr could look at all repositories listed in the manifest and check if an outstanding PR for it exists with the same GitHub username and branch name.
2. Send the PR to the external project (mbedtls in our example) and another PR to zephyr with the manifest modified so that it points to the fork and branch name of the project's PR. When those are merged, CI could then replace the contents of the manifest with the proper SHA.
3. Introduce some sort of per-PR ChangeId that CI knows how to parse.
4. GitHub adds support for cross-repository PRs. There have been multiple hints that this is coming, but obviously we cannot know when, if ever, this feature will be available.

Note that we have not at any point considered moving away from GitHub. The plan is to adapt to what the service offers and try to find a solution that works well with it. This is also one of the reasons we are first introducing west without actually splitting the ext/ folder into multiple external repos: we want to expose users to west before we start doing more radical changes.

Ideas and feedback welcome!

Thanks,

Carles


On Mon, Jan 28, 2019 at 10:43 AM Cufi, Carles
<carles.cufi@nordicsemi.no> wrote:

Hi all,

For a few months now we have been working on a meta-tool named west,
designed to act both as a command-line tool to build, flash an debug
Zephyr-based applications and also to manage the additional Git
repositories that Zephyr will require in order to build in the near
future.

West is written in Python 3, lives in its own repository [1] and its
bootstrapper is available on PyPi [2].
As soon as we merge the topic-west [3] branch into master (which
should happen in the next few days) you will need to install west in
order to flash and debug, since those commands will rely on havig west
present as part of your Zephyr workflow.

The updated west documentation will be online in the Zephyr
documentation website [4] as soon as the topic-west branch is merged
into master. In the meantime you can also look at the unrendered
documentation sources in the topic-west branch [5] and the existing
GitHub issues [6][7].

In order to install the west boostrapper (which you can do today) run:

# On Linux
pip3 install --user west

# On macOS and Windows
pip3 install west

Once the west bootstrapper is installed and the topic-west branch is
merged into master, you will have 2 choices to get a west main
installation.

1. Clone a new copy of the zephyr repository using west:

west init zephyrproject
cd zephyrproject
west update

2. Install west around an existing local zephyr clone:

Move the cloned zephyr/ repository to an empty enclosing folder (for
example zephyrproject/zephyr/), and from this enclosing folder
zephyrproject/ run:

west init -l zephyr/
west update
The -l <path to zephyr> parameter instructs west to use an existing
local copy instead of cloning a remote repository.

Feedback and patches are welcome, but note that the feature will
likely be merged as-is since we consider we have left ample time to
raise any major issues regarding the workflow and decisions taken during
the development of west. This is however only the beginning of west's
(hopefully) long existence as the Zephyr command-line meta-tool, and it
will certainly evolve and change considerably in the future with the
help of the community.

Please submit feedback in the form of GitHub issues on the west
repository itself [1] unless it affects features or functionality in the
zephyr repository directly.

I will reply to this email once the topic-west branch is merged into
master.

Thank you to everybody who has contributed so far!

Regards,

Carles

[1] https://github.com/zephyrproject-rtos/west
[2] https://pypi.org/project/west/
[3] https://github.com/zephyrproject-rtos/zephyr/tree/topic-west
[4] https://docs.zephyrproject.org/latest/tools/west/index.html
[5]
https://github.com/zephyrproject-rtos/zephyr/tree/topic-west/doc/tools
/west [6] https://github.com/zephyrproject-rtos/zephyr/issues/6205
[7] https://github.com/zephyrproject-rtos/zephyr/issues/6770



--
Luiz Augusto von Dentz

Join devel@lists.zephyrproject.org to automatically receive all group messages.