Part 1
요약·해설
west grep과 compare, project filter·group·submodule·import, schema version, workspace 용어와 PyPI 전환, 안정 API 선언까지 25개 release의 변경을 정리합니다.
grep · compare · update · manifest
groups · imports · schema · userdata
commands · configuration · manifest
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
AA5292BE94E375A330F9D2186207E4FFC1660D76E9E73C9AD5453DDF3E0FA74E
.. _west-release-notes:
West Release Notes
##################
v1.2.0
******
Major changes:
- New ``west grep`` command for running a "grep tool" in your west workspace's
repositories. Currently, ``git grep``, `ripgrep`_, and standard ``grep`` are
supported grep tools.
To run this command to get ``git grep foo`` results from all cloned,
active repositories, run:
.. code-block:: console
west grep foo
Here are some other examples for running different grep commands
with ``west grep``:
.. list-table::
* - ``git grep --untracked``
- ``west grep --untracked foo``
* - ``ripgrep``
- ``west grep --tool ripgrep foo``
* - ``grep --recursive``
- ``west grep --tool grep foo``
To switch the default grep tool in your workspace, run the appropriate
command in this table:
.. list-table::
* - ``ripgrep``
- ``west config grep.tool ripgrep``
* - ``grep``
- ``west config grep.tool grep``
For more details, run ``west help grep``.
Other changes:
- The manifest file format now supports a ``description`` field in each
``projects:`` element. See :ref:`west-manifests-projects` for examples.
- ``west list --format`` now accepts ``{description}`` in the format
string, which prints the project's ``description:`` value.
- ``west compare`` now always prints information about
:ref:`west-manifest-rev`.
Bug fixes:
- ``west init`` aborts if the destination directory already exists.
API changes:
- ``west.commands.WestCommand`` methods ``check_call()`` and
``check_output()`` now take any kwargs that can be passed on
to the underlying subprocess function.
- ``west.commands.WestCommand.run_subprocess()``: new wrapper
around ``subprocess.run()``. This could not be named ``run()``
because ``WestCommand`` already had a method by this name.
- ``west.commands.WestCommand`` methods ``dbg()``, ``inf()``,
``wrn()``, and ``err()`` now all take an ``end`` kwarg, which
is passed on to the call to ``print()``.
- ``west.manifest.Project`` now has a ``description`` attribute,
which contains the parsed value of the ``description:`` field
in the manifest data.
.. _ripgrep: https://github.com/BurntSushi/ripgrep#readme
v1.1.0
******
Major changes:
- ``west compare``: new command that compares the state of the
workspace against the manifest.
- Support for a new ``manifest.project-filter`` configuration option.
See :ref:`west-config-index` for details. The ``west manifest --freeze``
and ``west manifest --resolve`` commands currently cannot be used when
this option is set. This restriction can be removed in a later release.
- Project names which contain comma (``,``) or whitespace now generate
warnings. These warnings are errors if the new ``manifest.project-filter``
configuration option is set. The warnings may be promoted to errors in a
future major version of west.
Other changes:
- ``west forall`` now takese a ``--group`` argument that can be used
to restrict the command to only run in one or more groups. Run
``west help forall`` for details.
- All west commands will now output log messages from west API modules at
warning level or higher. In addition, the ``--verbose`` argument to west
can be used once to include informational messages, or twice to include
debug messages, from all commands.
Bug fixes:
- Various improvements to error messages, debug logging, and error handling.
API changes:
- ``west.manifest.Manifest.is_active()`` now respects the
``manifest.project-filter`` configuration option's value.
v1.0.1
******
Major changes:
- Manifest schema version "1.0" is now available for use in this release. This
is identical to the "0.13" schema version in terms of features, but can be
used by applications that do not wish to use a "0.x" manifest "version:"
field. See :ref:`west-manifest-schema-version` for details on this feature.
Bug fixes:
- West no longer exits with a successful error code when sent an
interrupt signal. Instead, it exits with a platform-specific
error code and signals to the calling environment that the
process was interrupted.
v1.0.0
******
Major changes in this release:
- The :ref:`west-apis` are now declared stable. Any breaking changes will be
communicated by a major version bump from v1.x.y to v2.x.y.
- West v1.0 no longer works with the Zephyr v1.14 LTS releases. This LTS has
long been obsoleted by Zephyr v2.7 LTS. If you need to use Zephyr v1.14, you
must use west v0.14 or earlier.
- Like the rest of Zephyr, west now requires Python v3.8 or later
- West commands no longer accept abbreviated command line arguments. For
example, you must now specify ``west update --keep-descendants`` instead of
using an abbreviation like ``west update --keep-d``. This is part of a change
applied to all of Zephyr's Python scripts' command-line interfaces. The
abbreviations were causing problems in practice when commands were updated to
add new options with similar names but different behavior to existing ones.
Other changes:
- All built-in west functions have stopped using ``west.log``
- ``west update``: new ``--submodule-init-config`` option.
See commit `9ba92b05`_ for details.
Bug fixes:
- West extension commands that failed to load properly sometimes dumped stack.
This has been fixed and west now prints a sensible error message in this case.
- ``west config`` now fails on malformed configuration option arguments
which lack a ``.`` in the option name
API changes:
- The west package now contains the metadata files necessary for some static
analyzers (such as `mypy`_) to auto-detect its type annotations.
See commit `d9f00e24`_ for details.
- the deprecated ``west.build`` module used for Zephyr v1.14 LTS compatibility was
removed
- the deprecated ``west.cmake`` module used for Zephyr v1.14 LTS compatibility was
removed
- the ``west.log`` module is now deprecated. This module uses global state,
which can make it awkward to use it as an API which multiple different python
modules may rely on.
- The :ref:`west-apis-commands` module got some new APIs which lay groundwork
for a future change to add a global verbosity control to a command's output,
and work to remove global state from the ``west`` package's API:
- New ``west.commands.WestCommand.__init__()`` keyword argument: ``verbosity``
- New ``west.commands.WestCommand`` property: ``color_ui``
- New ``west.commands.WestCommand`` methods, which should be used to print output
from extension commands instead of writing directly to sys.stdout or
sys.stderr: ``inf()``, ``wrn()``, ``err()``, ``die()``, ``banner()``,
``small_banner()``
- New ``west.commands.VERBOSITY`` enum
.. _9ba92b05: https://github.com/zephyrproject-rtos/west/commit/9ba92b054500d75518ff4c4646590bfe134db523
.. _d9f00e24: https://github.com/zephyrproject-rtos/west/commit/d9f00e242b8cb297b56e941982adf231281c6bae
.. _mypy: https://www.mypy-lang.org/
v0.14.0
*******
Bug fixes:
- West commands that were run with a bad local configuration file dumped stack
in a confusing way. This has been fixed and west now prints a sensible error
message in this case.
- A bug in the way west looks for the zephyr repository was fixed. The bug
itself usually appeared when running an extension command like ``west build``
in a new workspace for the first time; this used to fail (just for the first
time, not on subsequent command invocations) unless you ran the command in
the workspace's top level directory.
- West now prints sensible error messages when the user lacks permission to
open the manifest file instead of dumping stack traces.
API changes:
- The ``west.manifest.MalformedConfig`` exception type has been moved to the
``west.configuration`` module
- The ``west.manifest.MalformedConfig`` exception type has been moved to the
:ref:`west.configuration <west-apis-configuration>` module
- The ``west.configuration.Configuration`` class now raises ``MalformedConfig``
instead of ``RuntimeError`` in some cases
v0.13.1
*******
Bug fix:
- When calling west.manifest.Manifest.from_file() when outside of a
workspace, west again falls back on the ZEPHYR_BASE environment
variable to locate the workspace.
v0.13.0
*******
New features:
- You can now associate arbitrary user data with the manifest repository
itself in the ``manifest: self: userdata:`` value, like so:
.. code-block:: YAML
manifest:
self:
userdata: <any YAML value can go here>
Bug fixes:
- The path to the manifest repository reported by west could be incorrect in
certain circumstances detailed in [issue
#572](https://github.com/zephyrproject-rtos/west/issues/572). This has been
fixed as part of a larger overhaul of path handling support in the
``west.manifest`` API module.
- The ``west.Manifest.ManifestProject.__repr__`` return value was fixed
:ref:`API <west-apis>` changes:
- ``west.configuration.Configuration``: new object-oriented interface to the
current configuration. This reflects the system, global, and workspace-local
configuration values, and allows you to read, write, and delete configuration
options from any or all of these locations.
- ``west.commands.WestCommand``:
- ``config``: new attribute, returns a ``Configuration`` object or aborts the
program if none is set. This is always usable from within extension command
``do_run()`` implementations.
- ``has_config``: new boolean attribute, which is ``True`` if and only if
reading ``self.config`` will abort the program.
- The path handling in the ``west.manifest`` package has been overhauled in a
backwards-incompatible way. For more details, see commit
[56cfe8d1d1](https://github.com/zephyrproject-rtos/west/commit/56cfe8d1d1f3c9b45de3e793c738acd62db52aca).
- ``west.manifest.Manifest.validate()``: this now returns the validated data as
a Python dict. This can be useful if the value passed to this function was a
str, and the dict is desired.
- ``west.manifest.Manifest``: new:
- path attributes ``abspath``, ``posixpath``, ``relative_path``,
``yaml_path``, ``repo_path``, ``repo_posixpath``
- ``userdata`` attribute, which contains the parsed value
from ``manifest: self: userdata:``, or is None
- ``from_topdir()`` factory method
- ``west.manifest.ManifestProject``: new ``userdata`` attribute, which also
contains the parsed value from ``manifest: self: userdata:``, or is None
- ``west.manifest.ManifestImportFailed``: the constructor can now take any
value; this can be used to reflect failed imports from a :ref:`map
<west-manifest-import-map>` or other compound value.
- Deprecated configuration APIs:
The following APIs are now deprecated in favor of using a ``Configuration``
object. Usually this will be done via ``self.config`` from a ``WestCommand``
instance, but this can be done directly by instantiating a ``Configuration``
object for other usages.
- ``west.configuration.config``
- ``west.configuration.read_config``
- ``west.configuration.update_config``
- ``west.configuration.delete_config``
v0.12.0
*******
New features:
- West now works on the `MSYS2 <https://www.msys2.org/>`_ platform.
- West manifest files can now contain arbitrary user data associated with each
project. See :ref:`west-project-userdata` for details.
Bug fixes:
- The ``west list`` command's ``{sha}`` format key has been fixed for
the manifest repository; it now prints ``N/A`` ("not applicable")
as expected.
:ref:`API <west-apis>` changes:
- The ``west.manifest.Project.userdata`` attribute was added to support
project user data.
v0.11.1
*******
New features:
- ``west status`` now only prints output for projects which have a nonempty
status.
Bug fixes:
- The manifest file parser was incorrectly allowing project names which contain
the path separator characters ``/`` and ``\``. These invalid characters are
now rejected.
Note: if you need to place a project within a subdirectory of the workspace
topdir, use the ``path:`` key. If you need to customize a project's fetch URL
relative to its remote ``url-base:``, use ``repo-path:``. See
:ref:`west-manifests-projects` for examples.
- The changes made in west v0.10.1 to the ``west init --manifest-rev`` option
which selected the default branch name were leaving the manifest repository
in a detached HEAD state. This has been fixed by using ``git clone`` internally
instead of ``git init`` and ``git fetch``. See `issue #522`_ for details.
- The ``WEST_CONFIG_LOCAL`` environment variable now correctly
overrides the default location, :file:`<workspace topdir>/.west/config`.
- ``west update --fetch=smart`` (``smart`` is the default) now correctly skips
fetches for project revisions which are `lightweight tags`_ (it already
worked correctly for annotated tags; only lightweight tags were unnecessarily
fetched).
Other changes:
- The fix for issue #522 mentioned above introduces a new restriction. The
``west init --manifest-rev`` option value, if given, must now be either a
branch or a tag. In particular, "pseudo-branches" like GitHub's
``pull/1234/head`` references which could previously be used to fetch a pull
request can no longer be passed to ``--manifest-rev``. Users must now fetch
and check out such revisions manually after running ``west init``.
:ref:`API <west-apis>` changes:
- ``west.manifest.Manifest.get_projects()`` avoids incorrect results in
some edge cases described in `issue #523`_.
- ``west.manifest.Project.sha()`` now works correctly for tag revisions.
(This applies to both lightweight and annotated tags.)
.. _lightweight tags: https://git-scm.com/book/en/v2/Git-Basics-Tagging
.. _issue #522: https://github.com/zephyrproject-rtos/west/issues/522
.. _issue #523: https://github.com/zephyrproject-rtos/west/issues/523
v0.11.0
*******
New features:
- ``west update`` now supports ``--narrow``, ``--name-cache``, and
``--path-cache`` options. These can be influenced by the ``update.narrow``,
``update.name-cache``, and ``update.path-cache`` :ref:`west-config` options.
These can be used to optimize the speed of the update.
- ``west update`` now supports a ``--fetch-opt`` option that will be passed to
the ``git fetch`` command used to fetch remote revisions when updating each
project.
Bug fixes:
- ``west update`` now synchronizes Git submodules in projects by default. This
avoids issues if the URL changes in the manifest file from when the submodule
was first initialized. This behavior can be disabled by setting the
``update.sync-submodules`` configuration option to ``false``.
Other changes:
- the :ref:`west-apis-manifest` module has fixed docstrings for the Project
class
v0.10.1
*******
New features:
- The :ref:`west-init` command's ``--manifest-rev`` (``--mr``) option no longer
defaults to ``master``. Instead, the command will query the repository for
its default branch name and use that instead. This allows users to move from
``master`` to ``main`` without breaking scripts that do not provide this
option.
.. _west_0_10_0:
v0.10.0
*******
New features:
- The ``name`` key in a project's :ref:`submodules list
<west-manifest-submodules>` is now optional.
Bug fixes:
- West now checks that the manifest schema version is one of the explicitly
allowed values documented in :ref:`west-manifest-schema-version`. The old
behavior was just to check that the schema version was newer than the west
version where the ``manifest: version:`` key was introduced. This incorrectly
allowed invalid schema versions, like ``0.8.2``.
Other changes:
- A manifest file's ``group-filter`` is now propagated through an ``import``.
This is a change from how west v0.9.x handled this. In west v0.9.x, only the
top level manifest file's ``group-filter`` had any effect; the group filter
lists from any imported manifests were ignored.
Starting with west v0.10.0, the group filter lists from imported manifests
are also imported. For details, see :ref:`west-group-filter-imports`.
The new behavior will take effect if ``manifest: version:`` is not given or
is at least ``0.10``. The old behavior is still available in the top level
manifest file only with an explicit ``manifest: version: 0.9``. See
:ref:`west-manifest-schema-version` for more information on schema versions.
See `west pull request #482
<https://github.com/zephyrproject-rtos/west/pull/482>`_ for the motivation
for this change and additional context.
v0.9.1
******
Bug fixes:
- Commands like ``west manifest --resolve`` now correctly include group and
group filter information.
Other changes:
- West now warns if you combine ``import`` with ``group-filter``. Semantics for
this combination have changed starting with v0.10.x. See the v0.10.0 release
notes above for more information.
.. _west_0_9_0:
v0.9.0
******
.. warning::
The ``west config`` fix described below comes at a cost: any comments or
other manual edits in configuration files will be removed when setting a
configuration option via that command or the ``west.configuration`` API.
.. warning::
Combining the ``group-filter`` feature introduced in this release with
manifest imports is discouraged. The resulting behavior has changed in west
v0.10.
New features:
- West manifests now support :ref:`west-manifest-submodules`. This allows you
to clone `Git submodules
<https://git-scm.com/book/en/v2/Git-Tools-Submodules>`_ into a west project
repository in addition to the project repository itself.
- West manifests now support :ref:`west-manifest-groups`. Project groups can be
enabled and disabled to determine what projects are "active", and therefore
will be acted upon by the following commands: ``west update``, ``west list``,
``west diff``, ``west status``, ``west forall``.
- ``west update`` no longer updates inactive projects by default. It now
supports a ``--group-filter`` option which allows for one-time modifications
to the set of enabled and disabled project groups.
- Running ``west list``, ``west diff``, ``west status``, or ``west forall``
with no arguments does not print information for inactive projects by
default. If the user specifies a list of projects explicitly at the command
line, output for them is included regardless of whether they are active.
These commands also now support ``--all`` arguments to include all
projects, even inactive ones.
- ``west list`` now supports a ``{groups}`` format string key in its
``--format`` argument.
Bug fixes:
- The ``west config`` command and ``west.configuration`` API did not correctly
store some configuration values, such as strings which contain commas. This
has been fixed; see `commit 36f3f91e
<https://github.com/zephyrproject-rtos/west/commit/36f3f91e270782fb05f6da13800f433a9c48f130>`_
for details.
- A manifest file with an empty ``manifest: self: path:`` value is invalid, but
west used to let it pass silently. West now rejects such manifests.
- A bug affecting the behavior of the ``west init -l .`` command was fixed; see
`issue #435 <https://github.com/zephyrproject-rtos/west/issues/435>`_.
:ref:`API <west-apis>` changes:
- added ``west.manifest.Manifest.is_active()``
- added ``west.manifest.Manifest.group_filter``
- added ``submodules`` attribute to ``west.manifest.Project``, which has
newly added type ``west.manifest.Submodule``
Other changes:
- The :ref:`west-manifest-import` feature now supports the terms ``allowlist``
and ``blocklist`` instead of ``whitelist`` and ``blacklist``, respectively.
The old terms are still supported for compatibility, but the documentation
has been updated to use the new ones exclusively.
v0.8.0
******
This is a feature release which changes the manifest schema by adding support
for a ``path-prefix:`` key in an ``import:`` mapping, along with some other
features and fixes.
- Manifest import mappings now support a ``path-prefix:`` key, which places
the project and its imported repositories in a subdirectory of the workspace.
See :ref:`west-manifest-ex3.4` for an example.
- The west command line application can now also be run using ``python3 -m
west``. This makes it easier to run west under a particular Python
interpreter without modifying the :envvar:`PATH` environment variable.
- :ref:`west manifest --path <west-manifest-path>` prints the absolute path to
west.yml
- ``west init`` now supports an ``--mf foo.yml`` option, which initializes the
workspace using :file:`foo.yml` instead of :file:`west.yml`.
- ``west list`` now prints the manifest repository's path using the
``manifest.path`` :ref:`configuration option <west-config>`, which may differ
from the ``self: path:`` value in the manifest data. The old behavior is
still available, but requires passing a new ``--manifest-path-from-yaml``
option.
- Various Python API changes; see :ref:`west-apis` for details.
v0.7.3
******
This is a bugfix release.
- Fix an error where a failed import could leave the workspace in an unusable
state (see [PR #415](https://github.com/zephyrproject-rtos/west/pull/415) for
details)
v0.7.2
******
This is a bugfix and minor feature release.
- Filter out duplicate extension commands brought in by manifest imports
- Fix ``west.Manifest.get_projects()`` when finding the manifest repository by
path
v0.7.1
******
This is a bugfix and minor feature release.
- ``west update --stats`` now prints timing for operations which invoke a
subprocess, time spent in west's Python process for each project, and total
time updating each project.
- ``west topdir`` always prints a POSIX style path
- minor console output changes
v0.7.0
******
The main user-visible feature in west 0.7 is the :ref:`west-manifest-import`
feature. This allows users to load west manifest data from multiple different
files, resolving the results into a single logical manifest.
Additional user-visible changes:
- The idea of a "west installation" has been renamed to "west workspace" in
this documentation and in the west API documentation. The new term seems to
be easier for most people to work with than the old one.
- West manifests now support a :ref:`schema version
<west-manifest-schema-version>`.
- The "west config" command can now be run outside of a workspace, e.g.
to run ``west config --global section.key value`` to set a configuration
option's value globally.
- There is a new :ref:`west topdir <west-built-in-misc>` command, which
prints the root directory of the current west workspace.
- The ``west -vv init`` command now prints the git operations being performed,
and their results.
- The restriction that no project can be named "manifest" is now enforced; the
name "manifest" is reserved for the manifest repository, and is usable as
such in commands like ``west list manifest``, instead of ``west list
path-to-manifest-repository`` being the only way to say that
- It's no longer an error if there is no project named "zephyr". This is
part of an effort to make west generally usable for non-Zephyr use cases.
- Various bug fixes.
The developer-visible changes to the :ref:`west-apis` are:
- west.build and west.cmake: deprecated; this is Zephyr-specific functionality
and should never have been part of west. Since Zephyr v1.14 LTS relies on it,
it will continue to be included in the distribution, but will be removed
when that version of Zephyr is obsoleted.
- west.commands:
- WestCommand.requires_installation: deprecated; use requires_workspace instead
- WestCommand.requires_workspace: new
- WestCommand.has_manifest: new
- WestCommand.manifest: this is now settable
- west.configuration: callers can now identify the workspace directory
when reading and writing configuration files
- west.log:
- msg(): new
- west.manifest:
- The module now uses the standard logging module instead of west.log
- QUAL_REFS_WEST: new
- SCHEMA_VERSION: new
- Defaults: removed
- Manifest.as_dict(): new
- Manifest.as_frozen_yaml(): new
- Manifest.as_yaml(): new
- Manifest.from_file() and from_data(): these factory methods are more
flexible to use and less reliant on global state
- Manifest.validate(): new
- ManifestImportFailed: new
- ManifestProject: semi-deprecated and will likely be removed later.
- Project: the constructor now takes a topdir argument
- Project.format() and its callers are removed. Use f-strings instead.
- Project.name_and_path: new
- Project.remote_name: new
- Project.sha() now captures stderr
- Remote: removed
West now requires Python 3.6 or later. Additionally, some features may rely on
Python dictionaries being insertion-ordered; this is only an implementation
detail in CPython 3.6, but it is part of the language specification as of
Python 3.7.
v0.6.3
******
This point release fixes an error in the behavior of the deprecated
``west.cmake`` module.
v0.6.2
******
This point release fixes an error in the behavior of ``west
update --fetch=smart``, introduced in v0.6.1.
All v0.6.1 users must upgrade.
v0.6.1
******
.. warning::
Do not use this point release. Make sure to use v0.6.2 instead.
The user-visible features in this point release are:
- The :ref:`west-update` command has a new ``--fetch``
command line flag and ``update.fetch`` :ref:`configuration option
<west-config>`. The default value, "smart", skips fetching SHAs and tags
which are available locally.
- Better and more consistent error-handling in the ``west diff``, ``west
status``, ``west forall``, and ``west update`` commands. Each of these
commands can operate on multiple projects; if a subprocess related to one
project fails, these commands now continue to operate on the rest of the
projects. All of them also now report a nonzero error code from the west
process if any of these subprocesses fails (this was previously not true of
``west forall`` in particular).
- The :ref:`west manifest <west-built-in-misc>` command also handles errors
better.
- The :ref:`west list <west-built-in-misc>` command now works even when the
projects are not cloned, as long as its format string only requires
information which can be read from the manifest file. It still fails if the
format string requires data stored in the project repository, e.g. if it
includes the ``{sha}`` format string key.
- Commands and options which operate on git revisions now accept abbreviated
SHAs. For example, ``west init --mr SHA_PREFIX`` now works. Previously, the
``--mr`` argument needed to be the entire 40 character SHA if it wasn't a
branch or a tag.
The developer-visible changes to the :ref:`west-apis` are:
- west.log.banner(): new
- west.log.small_banner(): new
- west.manifest.Manifest.get_projects(): new
- west.manifest.Project.is_cloned(): new
- west.commands.WestCommand instances can now access the parsed
Manifest object via a new self.manifest property during the
do_run() call. If read, it returns the Manifest object or
aborts the command if it could not be parsed.
- west.manifest.Project.git() now has a capture_stderr kwarg
v0.6.0
******
- No separate bootstrapper
In west v0.5.x, the program was split into two components, a bootstrapper and
a per-installation clone. See `Multiple Repository Management in the v1.14
documentation`_ for more details.
This is similar to how Google's Repo tool works, and lets west iterate quickly
at first. It caused confusion, however, and west is now stable enough to be
distributed entirely as one piece via PyPI.
From v0.6.x onwards, all of the core west commands and helper classes are
part of the west package distributed via PyPI. This eliminates complexity
and makes it possible to import west modules from anywhere in the system,
not just extension commands.
- The ``selfupdate`` command still exists for backwards compatibility, but
now simply exits after printing an error message.
- Manifest syntax changes
- A west manifest file's ``projects`` elements can now specify their fetch
URLs directly, like so:
.. code-block:: yaml
manifest:
projects:
- name: example-project-name
url: https://github.com/example/example-project
Project elements with ``url`` attributes set in this way may not also have
``remote`` attributes.
- Project names must be unique: this restriction is needed to support future
work, but was not possible in west v0.5.x because distinct projects may
have URLs with the same final pathname component, like so:
.. code-block:: yaml
manifest:
remotes:
- name: remote-1
url-base: https://github.com/remote-1
- name: remote-2
url-base: https://github.com/remote-2
projects:
- name: project
remote: remote-1
path: remote-1-project
- name: project
remote: remote-2
path: remote-2-project
These manifests can now be written with projects that use ``url``
instead of ``remote``, like so:
.. code-block:: yaml
manifest:
projects:
- name: remote-1-project
url: https://github.com/remote-1/project
- name: remote-2-project
url: https://github.com/remote-2/project
- The ``west list`` command now supports a ``{sha}`` format string key
- The default format string for ``west list`` was changed to ``"{name:12}
{path:28} {revision:40} {url}"``.
- The command ``west manifest --validate`` can now be run to load and validate
the current manifest file, among other error-handling fixes related to
manifest parsing.
- Incompatible API changes were made to west's APIs. Further changes are
expected until API stability is declared in west v1.0.
- The ``west.manifest.Project`` constructor's ``remote`` and ``defaults``
positional arguments are now kwargs. A new ``url`` kwarg was also added; if
given, the ``Project`` URL is set to that value, and the ``remote`` kwarg
is ignored.
- ``west.manifest.MANIFEST_SECTIONS`` was removed. There is only one section
now, namely ``manifest``. The *sections* kwargs in the
``west.manifest.Manifest`` factory methods and constructor were also
removed.
- The ``west.manifest.SpecialProject`` class was removed. Use
``west.manifest.ManifestProject`` instead.
v0.5.x
******
West v0.5.x is the first version used widely by the Zephyr Project as part of
its v1.14 Long-Term Support (LTS) release. The `west v0.5.x documentation`_ is
available as part of the Zephyr's v1.14 documentation.
West's main features in v0.5.x are:
- Multiple repository management using Git repositories, including self-update
of west itself
- Hierarchical configuration files
- Extension commands
Versions Before v0.5.x
**********************
Tags in the west repository before v0.5.x are prototypes which are of
historical interest only.
.. _Multiple Repository Management in the v1.14 documentation:
https://docs.zephyrproject.org/1.14.0/guides/west/repo-tool.html
.. _west v0.5.x documentation:
https://docs.zephyrproject.org/1.14.0/guides/west/index.html
Part 3
한국어 전문 번역
West release note
이 문서는 널리 사용된 초기 West부터 v1.2.0까지 사용자 기능, manifest schema, bug fix, Python API 호환성 변화를 release 순서의 역순으로 정리합니다.
v1.2.0
주요 변경
west grepcommand가 추가되었습니다. West workspace의 저장소에서 grep 도구를 실행하며 현재git grep, ripgrep, 표준grep을 지원합니다. Clone되어 있고 active인 모든 저장소에서git grep foo결과를 얻으려면 다음을 실행합니다.west grep foo
west grep로 다른 grep 도구와 option을 실행하는 대응 예는 다음과 같습니다.
git grep --untracked | west grep --untracked foo |
ripgrep | west grep --tool ripgrep foo |
grep --recursive | west grep --tool grep foo |
Workspace의 기본 grep 도구를 바꾸는 command는 다음과 같습니다.
ripgrep | west config grep.tool ripgrep |
grep | west config grep.tool grep |
자세한 사용법은 west help grep로 확인합니다.
그 밖의 변경
- Manifest의 각
projects항목에descriptionfield를 둘 수 있습니다. west list --formatformat string에{description}을 사용하면 project의 description을 출력합니다.west compare는 이제 항상manifest-rev정보를 출력합니다.
Bug fix
west init은 destination directory가 이미 존재하면 중단합니다.
API 변경
WestCommand.check_call()과check_output()이 underlying subprocess function에 전달 가능한 모든 keyword argument를 받습니다.WestCommand.run_subprocess()가subprocess.run()wrapper로 추가되었습니다. 기존WestCommand.run()과 이름이 겹쳐run()이라고 부를 수 없었습니다.dbg(),inf(),wrn(),err()이print()에 전달할endkeyword argument를 받습니다.west.manifest.Project.descriptionattribute가 manifest의 parsed description을 담습니다.
v1.1.0
주요 변경
west compare가 workspace 상태와 manifest를 비교하는 새 command로 추가되었습니다.manifest.project-filterconfig option이 추가되었습니다. 이 option을 설정한 상태에서는 당시west manifest --freeze와--resolve를 사용할 수 없었으며 이후 release에서 제한을 없앨 수 있다고 안내했습니다.- Comma나 공백이 든 project 이름은 warning을 냅니다. manifest.project-filter를 설정했으면 error이며 향후 major version에서 항상 error로 바뀔 수 있습니다.
그 밖의 변경
west forall --group으로 한 개 이상의 group에만 command 실행을 제한할 수 있습니다.- 모든 West command가 API module의 warning 이상 log를 출력합니다. Global
--verbose를 한 번 주면 info, 두 번 주면 debug message도 포함합니다.
Bug fix
- Error message, debug logging, error handling을 여러 곳에서 개선했습니다.
API 변경
Manifest.is_active()가manifest.project-filterconfig 값을 반영합니다.
v1.0.1
주요 변경
- Manifest schema
"1.0"을 사용할 수 있습니다. 기능은"0.13"과 같지만 application이"0.x"version field를 피할 수 있게 합니다.
Bug fix
- Interrupt signal을 받았을 때 성공 code로 끝나던 문제를 고쳐 platform별 오류 code로 종료하고 호출 환경에 interrupt 사실을 알립니다.
v1.0.0
주요 변경
- West API가 stable로 선언되었습니다. 호환성을 깨는 변경은 v1.x.y에서 v2.x.y로 올라가는 major version으로 알립니다.
- West v1.0은 오래전에 Zephyr v2.7 LTS로 대체된 Zephyr v1.14 LTS와 더 이상 동작하지 않습니다. v1.14에는 West v0.14 이하를 사용해야 합니다.
- Zephyr와 마찬가지로 Python v3.8 이상을 요구합니다.
--keep-d처럼 command-line argument를 줄여 쓸 수 없습니다.west update --keep-descendants처럼 전체 이름을 써야 합니다. 비슷한 새 option이 추가될 때 약어 의미가 충돌하던 문제를 막기 위한 Zephyr Python CLI 전체 정책입니다.
그 밖의 변경
- Built-in West 기능이
west.log사용을 중단했습니다. west update --submodule-init-configoption이 추가되었습니다. 관련 commit을 참고합니다.
Bug fix
- Load에 실패한 extension command가 stack trace를 쏟던 문제를 고쳐 이해할 수 있는 오류를 표시합니다.
west configoption 이름에 dot이 없는 잘못된 argument를 거부합니다.
API 변경
- mypy 같은 static analyzer가 type annotation을 자동 감지할 metadata를 package에 넣었습니다.
- Zephyr v1.14 호환용으로 deprecated였던 west.build와 west.cmake module을 제거했습니다.
- Global state 때문에 여러 Python module이 함께 쓰기 불편한
west.logmodule을 deprecated 처리했습니다. WestCommand.__init__(verbosity=...)keyword,color_uiproperty, extension command 출력용inf(),wrn(),err(),die(),banner(),small_banner()method,west.commands.VERBOSITYenum을 추가했습니다.
v0.14.0
Bug fix
- 잘못된 local config로 command를 실행할 때 혼란스러운 stack trace 대신 정상적인 오류를 출력합니다.
west build같은 extension command를 새 workspace에서 처음 실행할 때 workspace top-level이 아니면 한 번만 실패하던 zephyr 저장소 탐색 bug를 고쳤습니다.- Manifest file을 열 permission이 없을 때 stack trace 대신 이해할 수 있는 오류를 출력합니다.
API 변경
west.manifest.MalformedConfigexception을west.configurationmodule로 옮겼습니다.west.manifest.MalformedConfigexception을west.configurationmodule로 옮겼습니다. 원문 release note에도 이 항목이 두 번 기재되어 있습니다.Configurationclass는 일부 경우RuntimeError대신MalformedConfig를 발생시킵니다.
v0.13.1
Bug fix
- Workspace 밖에서
Manifest.from_file()을 호출하면 다시ZEPHYR_BASE환경 변수로 workspace를 찾습니다.
v0.13.0
새 기능
- Manifest 저장소 자체에 임의 user data를
manifest.self.userdata로 연결할 수 있습니다.manifest: self: userdata: <any YAML value can go here>
Bug fix
- 일부 상황에서 West가 보고하는 manifest 저장소 path가 틀리던 issue #572를 path 처리 전면 개편으로 고쳤습니다.
west.Manifest.ManifestProject.__repr__반환값을 고쳤습니다.
API 변경
west.configuration.Configuration이 system, global, workspace-local 설정을 읽고 쓰고 지우는 object-oriented interface로 추가되었습니다.WestCommand.config는 Configuration을 반환하고 없으면 program을 중단합니다. Extensiondo_run()안에서는 항상 쓸 수 있습니다.has_config는 config 접근이 중단될지 나타냅니다.west.manifestpath 처리를 backward-incompatible하게 개편했습니다.Manifest.validate()가 validated data를 Python dict로 반환합니다.Manifest에abspath,posixpath,relative_path,yaml_path,repo_path,repo_posixpath,userdata,from_topdir()를 추가했습니다.ManifestProject.userdata가 self userdata를 담고,ManifestImportFailedconstructor가 mapping이나 compound import failure를 반영할 임의 값을 받을 수 있습니다.west.configuration.config,read_config,update_config,delete_config는 Configuration object 사용을 권장하며 deprecated되었습니다.
v0.12.0
새 기능
- MSYS2 platform에서 동작합니다.
- Manifest project마다 임의 user data를 넣을 수 있습니다.
Bug fix
west list의{sha}가 manifest 저장소에 대해 기대대로N/A를 출력합니다.
API 변경
west.manifest.Project.userdataattribute를 추가했습니다.
v0.11.1
새 기능
west status가 status가 비어 있지 않은 project만 출력합니다.
Bug fix
- Project 이름에 path separator
/와\를 허용하던 parser bug를 고쳤습니다. Workspace 하위 directory는path, remote url-base 기준 fetch path는repo-path를 사용합니다. west init --manifest-rev가 default branch를 선택한 뒤 manifest 저장소를 detached HEAD로 남기던 문제를git init·git fetch대신git clone을 사용해 고쳤습니다.WEST_CONFIG_LOCAL환경 변수가 기본<workspace>/.west/config위치를 올바르게 override합니다.west update --fetch=smart가 annotated tag뿐 아니라 local에 있는 lightweight tag도 fetch하지 않습니다.
그 밖의 변경
west init --manifest-rev값은 branch 또는 tag여야 합니다. GitHubpull/1234/head같은 pseudo-branch는 init 뒤에 사용자가 직접 fetch·checkout해야 합니다.
API 변경
Manifest.get_projects()의 edge case 오류를 고쳤습니다.Project.sha()가 lightweight·annotated tag revision에 모두 올바르게 동작합니다.
v0.11.0
새 기능
west update에--narrow,--name-cache,--path-cacheoption과 대응하는update.narrow,update.name-cache,update.path-cacheconfig를 추가해 update 속도를 최적화할 수 있습니다.west update --fetch-opt으로 각 project의git fetch에 option을 넘깁니다.
Bug fix
west update가 project Git submodule을 기본 sync해 manifest에서 URL이 바뀐 경우도 반영합니다.update.sync-submodules=false로 끌 수 있습니다.
그 밖의 변경
west.manifest.Projectclass docstring을 고쳤습니다.
v0.10.1
새 기능
west init --manifest-rev와--mr이 더 이상master를 기본값으로 쓰지 않고 remote repository의 default branch를 질의합니다. 따라서 option을 생략한 script도 master에서 main으로 옮길 수 있습니다.
v0.10.0
새 기능
- Project
submoduleslist의namekey가 선택 사항이 되었습니다.
Bug fix
- Manifest schema version이 명시적으로 허용된 값인지 검사합니다. 이전 방식은 도입 west version보다 새롭기만 하면
0.8.2같은 잘못된 schema도 허용했습니다.
그 밖의 변경
- Imported manifest의
group-filter도 전파합니다. v0.9.x는 top-level filter만 적용하고 imported filter를 무시했습니다. 새 동작은 version이 없거나0.10이상일 때 적용되며, top-level에version: 0.9를 명시하면 과거 동작을 유지합니다.
v0.9.1
Bug fix
west manifest --resolve같은 command가 group과 group-filter 정보를 올바르게 포함합니다.
그 밖의 변경
import와group-filter를 함께 쓰면 warning을 표시합니다. 이 조합의 semantics가 v0.10.x에서 바뀌었습니다.
v0.9.0
새 기능
- West project 저장소 안의 Git submodule도 clone할 수 있는 manifest submodule 지원을 추가했습니다.
- Project group을 enable/disable해 active project를 정하고
west update,list,diff,status,forall의 대상을 제한합니다. west update는 inactive project를 기본 갱신하지 않으며--group-filter로 한 번만 group 상태를 바꿀 수 있습니다.list,diff,status,forall은 argument가 없으면 inactive project를 출력하지 않습니다. Project를 명시하면 active 여부와 관계없이 포함하며--all로 전체를 포함할 수 있습니다.west list --format에{groups}key를 추가했습니다.
Bug fix
west config와 configuration API가 comma가 든 문자열을 잘못 저장하던 문제를 고쳤습니다.- 빈
manifest.self.path값을 reject합니다. west init -l .동작 bug를 고쳤습니다.
API 변경
Manifest.is_active()와Manifest.group_filter를 추가했습니다.Project.submodules와 새west.manifest.Submoduletype을 추가했습니다.
그 밖의 변경
- Manifest import에서
whitelist/blacklist대신allowlist/blocklist용어를 지원합니다. 과거 용어도 호환성을 위해 남지만 문서는 새 용어만 사용합니다.
v0.8.0
Manifest schema에 import mapping의 path-prefix와 여러 기능을 추가한 release입니다.
path-prefix는 project와 imported 저장소를 workspace 하위 directory에 배치합니다.python3 -m west로 실행할 수 있어PATH변경 없이 특정 Python interpreter를 선택할 수 있습니다.west manifest --path가 west.yml 절대 path를 출력합니다.west init --mf foo.yml로 west.yml 대신 foo.yml을 사용해 workspace를 초기화합니다.west list는 YAML의 self.path가 아니라manifest.pathconfig로 manifest 저장소 path를 출력합니다. 과거 동작은--manifest-path-from-yaml로 선택합니다.- 여러 Python API 변경이 포함되었습니다.
v0.7.3
Bugfix release입니다.
- Import 실패 뒤 workspace를 사용할 수 없게 될 수 있던 오류를 고쳤습니다.
v0.7.2
Bugfix와 minor feature release입니다.
- Manifest import가 가져온 중복 extension command를 걸러냅니다.
Manifest.get_projects()가 path로 manifest 저장소를 찾을 때의 오류를 고쳤습니다.
v0.7.1
Bugfix와 minor feature release입니다.
west update --stats가 subprocess operation 시간, project별 West Python process 시간, project별 전체 update 시간을 출력합니다.west topdir가 항상 POSIX style path를 출력합니다.- Console output을 일부 조정했습니다.
v0.7.0
가장 큰 사용자 기능은 여러 file의 manifest data를 하나의 논리적 manifest로 resolve하는 manifest import입니다.
사용자 변경
- 문서와 API의 "west installation" 용어를 더 이해하기 쉬운 "west workspace"로 바꿨습니다.
- Manifest schema version을 지원합니다.
west config --global section.key value처럼 workspace 밖에서도 global config를 설정할 수 있습니다.west topdir가 현재 workspace root를 출력합니다.west -vv init이 수행한 Git operation과 결과를 출력합니다.manifest라는 project 이름을 금지하고 manifest 저장소를 가리키는 예약 이름으로 사용합니다.west list manifest로 참조할 수 있습니다.- 이름이
zephyr인 project가 없어도 error가 아니므로 non-Zephyr use case에도 West를 사용할 수 있습니다. - 여러 bug를 고쳤습니다.
개발자 API 변경
west.build와west.cmake를 deprecated 처리했습니다. Zephyr v1.14 LTS가 사용하므로 당시는 배포에 남겼습니다.WestCommand.requires_installation은 deprecated이고requires_workspace를 사용합니다.requires_workspace,has_manifest가 추가되고manifest는 설정할 수 있습니다.- Configuration file read/write 시 workspace directory를 지정할 수 있습니다.
west.log.msg()를 추가했습니다.west.manifest는 표준 logging을 사용하고QUAL_REFS_WEST,SCHEMA_VERSION,Manifest.as_dict(),as_frozen_yaml(),as_yaml(),validate(),ManifestImportFailed,Project.name_and_path,Project.remote_name등을 추가했습니다.Defaults,Remote,Project.format()은 제거했습니다.Manifest.from_file()과from_data()는 global state 의존을 줄였고,Projectconstructor는 topdir을 받으며Project.sha()가 stderr를 capture합니다.ManifestProject는 semi-deprecated입니다.
West는 Python 3.6 이상을 요구합니다. 일부 기능은 dictionary insertion order에 의존하며 이는 CPython 3.6 구현 특성이지만 Python 3.7부터 language specification입니다.
v0.6.3
Deprecated west.cmake module 동작 오류를 고친 point release입니다.
v0.6.2
west update --fetch=smart의 v0.6.1 도입 오류를 고쳤습니다. 모든 v0.6.1 사용자는 반드시 upgrade해야 합니다.
v0.6.1
사용자 기능
west update --fetch와update.fetchconfig를 추가했습니다. 기본smart는 local에 있는 SHA와 tag fetch를 생략합니다.west diff,status,forall,update의 multi-project error handling을 일관되게 했습니다. 한 project subprocess가 실패해도 나머지를 계속 처리하고 하나라도 실패하면 West process가 nonzero code를 반환합니다.west manifesterror handling을 개선했습니다.west listformat이 manifest 정보만 요구하면 project가 clone되지 않아도 동작합니다.{sha}처럼 repository data가 필요하면 여전히 실패합니다.west init --mr SHA_PREFIX처럼 Git revision option에서 축약 SHA를 받습니다.
개발자 API 변경
west.log.banner()와small_banner()를 추가했습니다.Manifest.get_projects()와Project.is_cloned()를 추가했습니다.WestCommand.manifestproperty로do_run()중 parsed Manifest에 접근하며 parse 실패 시 command를 중단합니다.Project.git(capture_stderr=...)keyword를 추가했습니다.
v0.6.0
별도 bootstrapper 제거
v0.5.x는 Google Repo처럼 bootstrapper와 installation별 clone으로 나뉘어 초기 iteration은 빨랐지만 사용자를 혼란스럽게 했습니다. West가 안정되면서 core command와 helper를 PyPI package 하나로 배포해 복잡성을 없애고 extension command 밖의 system 어디서도 module을 import할 수 있게 했습니다.
selfupdatecommand는 호환성을 위해 남지만 오류 message를 출력하고 종료합니다.
Manifest syntax 변경
- Project가 완전한 fetch URL을 직접 지정할 수 있습니다. 이때
remote를 함께 둘 수 없습니다.manifest: projects: - name: example-project-name url: https://github.com/example/example-project - Project 이름은 고유해야 합니다. v0.5.x에서는 서로 다른 remote의 URL 마지막 path가 같아 이름이 중복될 수 있었습니다.
새 형식에서는 URL을 직접 쓰고 서로 다른 이름을 사용합니다.manifest: remotes: - name: remote-1 url-base: https://github.com/remote-1 - name: remote-2 url-base: https://github.com/remote-2 projects: - name: project remote: remote-1 path: remote-1-project - name: project remote: remote-2 path: remote-2-projectmanifest: projects: - name: remote-1-project url: https://github.com/remote-1/project - name: remote-2-project url: https://github.com/remote-2/project
west list에{sha}format key를 추가했습니다.- 기본 format을
"{name:12} {path:28} {revision:40} {url}"로 바꿨습니다. west manifest --validate로 현재 manifest를 load·validate할 수 있습니다.
호환되지 않는 API 변경
Projectconstructor의remote와defaultspositional argument가 keyword로 바뀌고urlkeyword가 추가되었습니다. URL이 있으면 remote는 무시합니다.MANIFEST_SECTIONS와 Manifest factory·constructor의 sections keyword를 제거했습니다. 이제 section은manifest하나뿐입니다.SpecialProject를 제거하고ManifestProject를 사용합니다.
API 안정성은 v1.0 선언 전까지 보장하지 않았으므로 추가 변경이 예상됐습니다.
v0.5.x
Zephyr v1.14 LTS에서 널리 사용된 첫 West version입니다. v0.5.x 문서는 Zephyr v1.14 문서에 남아 있습니다.
- West 자체 self-update를 포함한 여러 Git 저장소 관리
- 계층형 configuration file
- Extension command
v0.5.x 이전 version
West 저장소의 v0.5.x 이전 tag는 역사적 관심만 있는 prototype입니다.
Zephyr v1.14 다중 저장소 관리 문서에서 당시 구조를 볼 수 있습니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.