2018-08-04 18:17:08 -07:00
Maintaining the Neovim project
==============================
Notes on maintaining the Neovim project.
2019-01-10 17:20:15 -07:00
General guidelines
------------------
* Decide by cost-benefit
* Write down what was decided
* Constraints are good
* Use automation to solve problems
2021-09-14 10:20:33 -07:00
* Never break the API... but sometimes break the UI
2019-01-10 17:20:15 -07:00
2022-10-09 05:21:52 -07:00
Issue triage
------------
2018-08-04 18:17:08 -07:00
2021-09-14 10:20:33 -07:00
In practice we haven't found a way to forecast more precisely than "next" and
"after next". So there are usually one or two (at most) planned milestones:
2018-08-04 18:17:08 -07:00
2022-10-09 05:21:52 -07:00
* Next bugfix-release (1.0.x)
* Next feature-release (1.x.0)
2018-08-04 18:17:08 -07:00
The forecasting problem might be solved with an explicit priority system (like
2024-05-14 16:18:33 -07:00
Vim's todo.txt). Meanwhile the Neovim priority system is defined by:
2018-08-04 18:17:08 -07:00
2022-10-09 05:21:52 -07:00
* PRs nearing completion.
2023-05-13 12:33:22 -07:00
* Issue labels. E.g. the `has:plan` label increases the ticket's priority merely
2019-01-10 17:20:15 -07:00
for having a plan written down: it is _closer to completion_ than tickets
without a plan.
2022-10-09 05:21:52 -07:00
* Comment activity or new information.
2018-08-04 18:17:08 -07:00
2021-09-14 10:20:33 -07:00
Anything that isn't in the next milestone, and doesn't have a finished PR—is
2018-08-04 18:17:08 -07:00
just not something you care very much about, by construction. Post-release you
can review open issues, but chances are your next milestone is already getting
2021-09-14 10:20:33 -07:00
full... :)
2018-08-04 18:17:08 -07:00
2019-08-25 16:00:52 -07:00
Release policy
2018-08-04 18:17:08 -07:00
--------------
2019-01-10 17:20:15 -07:00
Release "often", but not "early".
2018-08-04 18:17:08 -07:00
2019-01-10 17:20:15 -07:00
The (unreleased) `master` branch is the "early" channel; it should not be
2019-04-27 09:25:55 -07:00
released if it's not stable. High-risk changes may be merged to `master` if
2019-08-25 16:00:52 -07:00
the next release is not imminent.
2018-08-04 18:17:08 -07:00
2019-04-27 09:25:55 -07:00
For maintenance releases, create a `release-x.y` branch. If the current release
has a major bug:
2018-08-04 18:17:08 -07:00
2019-01-10 17:20:15 -07:00
1. Fix the bug on `master` .
2. Cherry-pick the fix to `release-x.y` .
2019-04-27 09:25:55 -07:00
3. Cut a release from `release-x.y` .
2024-05-15 14:56:52 -07:00
* Run `./scripts/release.sh` (requires [git cliff ](https://github.com/orhun/git-cliff ))
2022-10-09 05:21:52 -07:00
* The [CI job ](https://github.com/neovim/neovim/blob/3d45706478cd030c3ee05b4f336164bb96138095/.github/workflows/release.yml#L11-L13 )
2024-05-02 06:57:21 -07:00
will update the release assets and [force-push to the "stable" tag ](https://github.com/neovim/neovim/blob/cdd87222c86c5b2274a13d36f23de0637462e317/.github/workflows/release.yml#L229 ).
2019-08-25 16:00:52 -07:00
2022-10-09 05:21:52 -07:00
### Release automation
2021-10-26 08:45:15 -07:00
2024-05-14 16:18:33 -07:00
Neovim automation includes a [backport bot ](https://github.com/korthout/backport-action ).
Trigger the action by labeling a PR with `ci:backport release-x.y` . See `.github/workflows/backport.yml` .
2021-09-26 17:24:20 -07:00
2023-06-19 03:43:32 -07:00
Deprecating and removing features
---------------------------------
Neovim inherits many features and design decisions from Vim, not all of which
align with the goals of this project. It is sometimes desired or necessary to
remove existing features, or refactor parts of the code that would change
user's workflow. In these cases, a deprecation policy is needed to properly
inform users of the change.
2023-09-15 07:32:47 -07:00
When a (non-experimental) feature is slated to be removed it should:
2023-06-19 03:43:32 -07:00
2023-08-09 08:49:52 -07:00
1. Be _soft_ deprecated in the _next_ release
2024-05-02 06:57:21 -07:00
- Use of the deprecated feature will still work.
- This means deprecating via documentation and annotation (`@deprecated`).
- Include a note in `deprecated.txt` .
- For Lua features, use `vim.deprecate()` . The specified version is the
current minor version + 2. For example, if the current version is
`v0.10.0-dev-1957+gd676746c33` then use `0.12` .
- For Vimscript features, use `v:lua.vim.deprecate()` . Use the same version
as described for Lua features.
2023-08-09 08:49:52 -07:00
2. Be _hard_ deprecated in a following a release in which it was soft deprecated.
2024-05-02 06:57:21 -07:00
- Use of the deprecated feature will still work but should issue a warning.
- Features implemented in C will need bespoke implementations to communicate
to users that the feature is deprecated.
2023-08-09 08:49:52 -07:00
3. Be removed in a release following the release in which it was hard deprecated
2024-05-02 06:57:21 -07:00
- Usually this will be the next release, but it may be a later release if
a longer deprecation cycle is desired
- If possible, keep the feature as a stub (e.g. function API) and issue an
error when it is accessed.
2023-08-09 08:49:52 -07:00
Example:
2024-05-02 06:57:21 -07:00
Deprecation Removal
┆ ┆ ┆
┆ Soft ┆ Hard ┆
┆ Deprecation ┆ Deprecation ┆
┆ Period ┆ Period ┆
────────────────────────────────────────────────────────────
Version: 0.10 0.11 0.12
────────────────────────────────────────────────────────────
Old code Old code Old code
+ +
New code New code New code
2023-06-19 03:43:32 -07:00
Feature removals which may benefit from community input or further discussion
should also have a tracking issue (which should be linked to in the release
notes).
2023-09-15 07:32:47 -07:00
Exceptions to this policy may be made (for experimental subsystems or when
there is broad consensus among maintainers). The rationale for the exception
should be stated explicitly and publicly.
2022-10-09 05:21:52 -07:00
Third-party dependencies
------------------------
2023-12-12 09:26:23 -07:00
For some dependencies we maintain temporary "forks", which are simply private
branches with a few extra patches, while we wait for the upstream project to
merge the patches. This is done instead of maintaining the patches as (fragile)
CMake `PATCH_COMMAND` steps.
2023-11-27 02:43:13 -07:00
These "bundled" dependencies can be updated by bumping their versions in `cmake.deps/deps.txt` .
2023-01-05 12:51:45 -07:00
Some can be auto-bumped by `scripts/bump_deps.lua` .
2022-10-09 05:21:52 -07:00
* [LuaJIT ](https://github.com/LuaJIT/LuaJIT )
* [Lua ](https://www.lua.org/download.html )
* [Luv ](https://github.com/luvit/luv )
2023-02-09 03:43:34 -07:00
* When bumping, also sync [our bundled documentation ](https://github.com/neovim/neovim/blob/master/runtime/doc/luvref.txt ) with [the upstream documentation ](https://github.com/luvit/luv/blob/master/docs.md ).
2022-10-09 05:21:52 -07:00
* [gettext ](https://ftp.gnu.org/pub/gnu/gettext/ )
* [libiconv ](https://ftp.gnu.org/pub/gnu/libiconv )
* [libuv ](https://github.com/libuv/libuv )
2024-05-14 16:18:33 -07:00
* [libvterm ](https://www.leonerd.org.uk/code/libvterm/ )
2024-05-02 06:57:21 -07:00
* Downloading from the original source is unreliable, so we use our [mirror ](https://github.com/neovim/libvterm ) instead.
2022-10-09 05:21:52 -07:00
* [lua-compat ](https://github.com/keplerproject/lua-compat-5.3 )
* [tree-sitter ](https://github.com/tree-sitter/tree-sitter )
* [unibilium ](https://github.com/neovim/unibilium )
2024-05-02 06:57:21 -07:00
* The original project [was abandoned ](https://github.com/neovim/neovim/issues/10302 ), so the [neovim/unibilium ](https://github.com/neovim/unibilium ) fork is considered "upstream" and is maintained on the `master` branch.
2023-11-21 11:00:30 -07:00
* [treesitter parsers ](https://github.com/neovim/neovim/blob/7e97c773e3ba78fcddbb2a0b9b0d572c8210c83e/cmake.deps/deps.txt#L47-L62 )
2022-10-09 05:21:52 -07:00
### Vendored dependencies
These dependencies are "vendored" (inlined), we must update the sources manually:
* `src/mpack/` : [libmpack ](https://github.com/libmpack/libmpack )
* send improvements upstream!
* `src/xdiff/` : [xdiff ](https://github.com/git/git/tree/master/xdiff )
* `src/cjson/` : [lua-cjson ](https://github.com/openresty/lua-cjson )
2023-05-13 12:33:22 -07:00
* `src/klib/` : [Klib ](https://github.com/attractivechaos/klib )
2022-10-09 05:21:52 -07:00
* `runtime/lua/vim/inspect.lua` : [inspect.lua ](https://github.com/kikito/inspect.lua )
* `src/nvim/tui/terminfo_defs.h` : terminfo definitions
* Run `scripts/update_terminfo.sh` to update these definitions.
2023-08-09 02:06:13 -07:00
* `runtime/lua/vim/lsp/_meta/protocol.lua` : LSP specification
2023-08-01 06:52:53 -07:00
* Run `scripts/gen_lsp.lua` to update.
2023-09-22 15:25:06 -07:00
* `runtime/lua/vim/_meta/lpeg.lua` : LPeg definitions.
* Refer to [`LuaCATS/lpeg` ](https://github.com/LuaCATS/lpeg ) for updates.
2024-01-11 10:24:44 -07:00
* Update the git SHA revision from which the documentation was taken.
2023-11-21 11:00:30 -07:00
* `runtime/lua/vim/re.lua` : LPeg regex module.
* Vendored from LPeg. Needs to be updated when LPeg is updated.
2024-01-11 10:24:44 -07:00
* `runtime/lua/vim/_meta/re.lua` : docs for LPeg regex module.
* Needs to be updated when LPeg is updated.
2022-11-28 14:43:10 -07:00
* `src/bit.c` : only for PUC lua: port of `require'bit'` from luajit https://bitop.luajit.org/
2023-09-09 14:45:06 -07:00
* `runtime/lua/coxpcall.lua` : coxpcall (only needed for PUC lua, builtin to luajit)
2023-11-30 12:50:51 -07:00
* `src/termkey` : [libtermkey ](https://github.com/neovim/libtermkey )
2022-10-09 05:21:52 -07:00
2024-04-30 04:30:21 -07:00
Other dependencies
2023-07-04 10:22:04 -07:00
--------------------------
2022-10-22 22:52:45 -07:00
2023-07-12 10:27:14 -07:00
* GitHub users:
* https://github.com/marvim
* https://github.com/nvim-winget
2024-04-30 04:30:21 -07:00
* Org secrets/tokens:
* `CODECOV_TOKEN`
2023-07-04 10:22:04 -07:00
* Domain names (held in https://namecheap.com):
* neovim.org
* neovim.io
* packspec.org
* pkgjson.org
2023-07-12 10:27:14 -07:00
* DNS for the above domains is managed in https://cloudflare.com (not the domain registrar)
2023-07-04 10:22:04 -07:00
2023-12-12 09:56:06 -07:00
Refactoring
-----------
### Frozen legacy modules
Refactoring Vim structurally and aesthetically is an important goal of Neovim.
But there are some modules that should not be changed significantly, because
they are maintained Vim, at present. Until someone takes "ownership" of these
modules, the cost of any significant changes (including style or structural
changes that re-arrange the code) to these modules outweighs the benefit. The
modules are:
- `regexp.c`
- `indent_c.c`
2023-07-04 10:22:04 -07:00
Automation (CI)
---------------
2022-10-22 22:52:45 -07:00
2023-07-12 10:27:14 -07:00
### Backup
2023-07-04 10:22:04 -07:00
2023-07-12 10:27:14 -07:00
Discussions from issues and PRs are backed up here:
https://github.com/neovim/neovim-backup
2022-10-22 22:52:45 -07:00
2023-07-12 10:27:14 -07:00
### Development guidelines
* CI and automation jobs are primarily driven by GitHub Actions.
2023-07-04 10:22:04 -07:00
* Avoid macOS if an Ubuntu or a Windows runner can be used instead. This is
because macOS runners have [tighter restrictions on the number of concurrent
jobs](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits).
2023-07-12 10:27:14 -07:00
* Runner versions:
* For special-purpose jobs where the runner version doesn't really matter,
prefer `-latest` tags so we don't need to manually bump the versions. An
2024-03-11 22:51:53 -07:00
example of a special-purpose workflow is `labeler_pr.yml` .
2024-10-05 10:03:11 -07:00
* For our testing job `test.yml` , prefer to use the latest version
explicitly. Avoid using the `-latest` tags here as it makes it difficult
to determine from an unrelated PR if a failure is due to the PR itself or
due to GitHub bumping the `-latest` tag without our knowledge. There's
also a high risk that automatically bumping the CI versions will fail due
to manual work being required from experience.
2023-07-12 10:27:14 -07:00
* For our release job, which is `release.yml` , prefer to use the oldest
stable (i.e. non-deprecated) versions available. The reason is that we're
trying to produce images that work in the broadest number of environments,
and therefore want to use older releases.
2022-10-22 22:52:45 -07:00
2024-01-28 08:51:06 -07:00
### Special labels
Some github labels are used to trigger certain jobs:
2024-05-01 06:39:46 -07:00
* `ci:backport release-x.y` - backport to branch `release-x.y`
2024-03-08 06:07:27 -07:00
* `ci:s390x` - enable s390x CI
* `ci:skip-news` - skip news.yml workflows
2024-03-03 04:01:37 -07:00
* `ci:windows-asan` - test windows with ASAN enabled
2024-03-08 06:07:27 -07:00
* `needs:response` - close PR after a certain amount of time if author doesn't
2024-01-28 08:51:06 -07:00
respond
2019-08-25 16:00:52 -07:00
See also
--------
2018-08-04 18:17:08 -07:00
2022-10-09 05:21:52 -07:00
* https://github.com/neovim/neovim/issues/862
* https://github.com/git/git/blob/master/Documentation/howto/maintain-git.txt