371 Commits

Author SHA1 Message Date
e30d8e4ce0 runtime(kotlin): Add Kotlin runtime files (#13110)
Closes udalov/kotlin-vim#39

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 18:51:22 +02:00
a66feb5fb5 patch 9.0.1903: CI fails because snd-dummy modules missing
Problem:  Github Actions fails because snd-dummy modules missing
          in current runner images
Solution: ignore modprobe error

related: actions/runner-images#8295

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-16 18:29:42 +02:00
213c323184 CI: Bump actions/checkout from 3 to 4 (#13072)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 19:43:33 +02:00
a4245a10ea patch 9.0.1871: Github CI does not run i386 job
Problem:  Github CI does not run i386 job
Solution: Add a i386 architecture

Add CI testing for i386

message_test recently failed on i386, which exposed a gap in the CI
testing.  Convert the shadowdir job to one that runs on i386 so we get
32-bit test coverage.

Since the GHA runners are x86_64, we can enable the i386 architecture
in dpkg and install i386 packages for the i386 CI jobs.  However, this
can't currently be done with features=huge since that would require
installing python3-dev:i386, which breaks the CI environment.

closes: #12975

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
2023-09-05 07:41:23 +02:00
8b20203141 patch 9.0.1844: doc helptags may not be up to date
Problem:  doc helptags may not be up to date
Solution: Add CI jobs to verify helptags are updated

Also, re-generate the tags file with updated list so it will pass CI.

closes: #13012

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-02 16:04:50 +02:00
acb91d3905 runtime(zserio): add zserio syntax (#13005)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-01 23:10:26 +02:00
1610528cc3 runtime(forth): Update syntax and ftplugin files (#12976)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-31 08:17:16 +02:00
3e1e63de18 patch 9.0.1819: Github CI too complex
Problem:  Github CI too complex
Solution: CI: Tidy up matrix

Perform the following changes to the CI configuration:
 - Move common CFLAGS to ci/config.mk.sed
 - Change extra key to array to able to assign no or multiple values
   explicitly
 - Modify luaver variable handling
   - lib${{ matrix.luaver }}-dev ${{ matrix.luaver }} are confusing
     as package names
 - Deduplicate CONFOPT setting

closes: #12955

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: ichizok <gclient.gaap@gmail.com>
2023-08-29 22:20:21 +02:00
f937ab32a1 runtime: Set b:undo_ftplugin where missing (#12943)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-28 21:32:27 +02:00
58f39d89a8 patch 9.0.1791: No tests for the termdebug plugin
Problem:  No tests for the termdebug plugin
Solution: Add some simple tests for the termdebug plugin

closes: #12927

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 11:14:44 +02:00
9180633e68 Codeowners: add KBelabas for runtime/syntax/gp.vim (#12898)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-23 17:07:23 +01:00
e34b51e95f runtime(solidity): add new ftplugin (#12877)
Set undo_{ftplugin,indent}

closes #11240

Co-authored-by: cothi <jiungdev@gmail.com>
2023-08-22 19:28:42 +01:00
c13b3d1350 patch 9.0.1776: No support for stable Python 3 ABI
Problem:  No support for stable Python 3 ABI
Solution: Support Python 3 stable ABI

Commits:
1) Support Python 3 stable ABI to allow mixed version interoperatbility

Vim currently supports embedding Python for use with plugins, and the
"dynamic" linking option allows the user to specify a locally installed
version of Python by setting `pythonthreedll`. However, one caveat is
that the Python 3 libs are not binary compatible across minor versions,
and mixing versions can potentially be dangerous (e.g. let's say Vim was
linked against the Python 3.10 SDK, but the user sets `pythonthreedll`
to a 3.11 lib). Usually, nothing bad happens, but in theory this could
lead to crashes, memory corruption, and other unpredictable behaviors.
It's also difficult for the user to tell something is wrong because Vim
has no way of reporting what Python 3 version Vim was linked with.

For Vim installed via a package manager, this usually isn't an issue
because all the dependencies would already be figured out. For prebuilt
Vim binaries like MacVim (my motivation for working on this), AppImage,
and Win32 installer this could potentially be an issue as usually a
single binary is distributed. This is more tricky when a new Python
version is released, as there's a chicken-and-egg issue with deciding
what Python version to build against and hard to keep in sync when a new
Python version just drops and we have a mix of users of different Python
versions, and a user just blindly upgrading to a new Python could lead to
bad interactions with Vim.

Python 3 does have a solution for this problem: stable ABI / limited API
(see https://docs.python.org/3/c-api/stable.html). The C SDK limits the
API to a set of functions that are promised to be stable across
versions. This pull request adds an ifdef config that allows us to turn
it on when building Vim. Vim binaries built with this option should be
safe to freely link with any Python 3 libraies without having the
constraint of having to use the same minor version.

Note: Python 2 has no such concept and this doesn't change how Python 2
integration works (not that there is going to be a new version of Python
2 that would cause compatibility issues in the future anyway).

---

Technical details:
======

The stable ABI can be accessed when we compile with the Python 3 limited
API (by defining `Py_LIMITED_API`). The Python 3 code (in `if_python3.c`
and `if_py_both.h`) would now handle this and switch to limited API
mode. Without it set, Vim will still use the full API as before so this
is an opt-in change.

The main difference is that `PyType_Object` is now an opaque struct that
we can't directly create "static types" out of, and we have to create
type objects as "heap types" instead. This is because the struct is not
stable and changes from version to version (e.g. 3.8 added a
`tp_vectorcall` field to it). I had to change all the types to be
allocated on the heap instead with just a pointer to them.

Other functions are also simply missing in limited API, or they are
introduced too late (e.g. `PyUnicode_AsUTF8AndSize` in 3.10) to it that
we need some other ways to do the same thing, so I had to abstract a few
things into macros, and sometimes re-implement functions like
`PyObject_NEW`.

One caveat is that in limited API, `OutputType` (used for replacing
`sys.stdout`) no longer inherits from `PyStdPrinter_Type` which I don't
think has any real issue other than minor differences in how they
convert to a string and missing a couple functions like `mode()` and
`fileno()`.

Also fixed an existing bug where `tp_basicsize` was set incorrectly for
`BufferObject`, `TabListObject, `WinListObject`.

Technically, there could be a small performance drop, there is a little
more indirection with accessing type objects, and some APIs like
`PyUnicode_AsUTF8AndSize` are missing, but in practice I didn't see any
difference, and any well-written Python plugin should try to avoid
excessing callbacks to the `vim` module in Python anyway.

I only tested limited API mode down to Python 3.7, which seemes to
compile and work fine. I haven't tried earlier Python versions.

2) Fix PyIter_Check on older Python vers / type##Ptr unused warning

For PyIter_Check, older versions exposed them as either macros (used in
full API), or a function (for use in limited API). A previous change
exposed PyIter_Check to the dynamic build because Python just moved it
to function-only in 3.10 anyway. Because of that, just make sure we
always grab the function in dynamic builds in earlier versions since
that's what Python eventually did anyway.

3) Move Py_LIMITED_API define to configure script

Can now use --with-python-stable-abi flag to customize what stable ABI
version to target. Can also use an env var to do so as well.

4) Show +python/dyn-stable in :version, and allow has() feature query

Not sure if the "/dyn-stable" suffix would break things, or whether we
should do it another way. Or just don't show it in version and rely on
has() feature checking.

5) Documentation first draft. Still need to implement v:python3_version

6) Fix PyIter_Check build breaks when compiling against Python 3.8

7) Add CI coverage stable ABI on Linux/Windows / make configurable on Windows

This adds configurable options for Windows make files (both MinGW and
MSVC). CI will also now exercise both traditional full API and stable
ABI for Linux and Windows in the matrix for coverage.

Also added a "dynamic" option to Linux matrix as a drive-by change to
make other scripting languages like Ruby / Perl testable under both
static and dynamic builds.

8) Fix inaccuracy in Windows docs

Python's own docs are confusing but you don't actually want to use
`python3.dll` for the dynamic linkage.

9) Add generated autoconf file

10) Add v:python3_version support

This variable indicates the version of Python3 that Vim was built
against (PY_VERSION_HEX), and will be useful to check whether the Python
library you are loading in dynamically actually fits it. When built with
stable ABI, it will be the limited ABI version instead
(`Py_LIMITED_API`), which indicates the minimum version of Python 3 the
user should have, rather than the exact match. When stable ABI is used,
we won't be exposing PY_VERSION_HEX in this var because it just doesn't
seem necessary to do so (the whole point of stable ABI is the promise
that it will work across versions), and I don't want to confuse the user
with too many variables.

Also, cleaned up some documentation, and added help tags.

11) Fix Python 3.7 compat issues

Fix a couple issues when using limited API < 3.8

- Crash on exit: In Python 3.7, if a heap-allocated type is destroyed
  before all instances are, it would cause a crash later. This happens
  when we destroyed `OptionsType` before calling `Py_Finalize` when
  using the limited API. To make it worse, later versions changed the
  semantics and now each instance has a strong reference to its own type
  and the recommendation has changed to have each instance de-ref its
  own type and have its type in GC traversal. To avoid dealing with
  these cross-version variations, we just don't free the heap type. They
  are static types in non-limited-API anyway and are designed to last
  through the entirety of the app, and we also don't restart the Python
  runtime and therefore do not need it to have absolutely 0 leaks.

  See:
  - https://docs.python.org/3/whatsnew/3.8.html#changes-in-the-c-api
  - https://docs.python.org/3/whatsnew/3.9.html#changes-in-the-c-api

- PyIter_Check: This function is not provided in limited APIs older than
  3.8. Previously I was trying to mock it out using manual
  PyType_GetSlot() but it was brittle and also does not actually work
  properly for static types (it will generate a Python error). Just
  return false. It does mean using limited API < 3.8 is not recommended
  as you lose the functionality to handle iterators, but from playing
  with plugins I couldn't find it to be an issue.

- Fix loading of PyIter_Check so it will be done when limited API < 3.8.
  Otherwise loading a 3.7 Python lib will fail even if limited API was
  specified to use it.

12) Make sure to only load `PyUnicode_AsUTF8AndSize` in needed in limited API

We don't use this function unless limited API >= 3.10, but we were
loading it regardless. Usually it's ok in Unix-like systems where Python
just has a single lib that we load from, but in Windows where there is a
separate python3.dll this would not work as the symbol would not have
been exposed in this more limited DLL file. This makes it much clearer
under what condition is this function needed.

closes: #12032

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-08-20 21:18:38 +02:00
bedc69f9d6 patch 9.0.1766: Runtime: Missing QML support
Problem:  Runtime: Missing QML support
Solution: Add QML support to Vim

closes: #12810

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: ChaseKnowlden <haroldknowlden@gmail.com>
2023-08-20 19:10:03 +02:00
4924ad099f patch 9.0.1764: CI: label should not be set on all yml files
Problem:  CI: label should not be set on all yml files
Solution: only set it for specific yml files in .github

closes: #12855

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-20 18:58:46 +02:00
8b8f7d19f8 patch 9.0.1751: CI: labeler configuration not found
Problem: CI: labeler configuration not found
         (after 9.0.1748)
Solution: set configuration path

closes: #12852

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-19 15:46:11 +02:00
6d192a4ac9 patch 9.0.1748: CI: cannot label issues automatically
Problem:  CI: cannot label issues automatically
Solution: Create CI labeler

closes: #12788

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-19 14:45:26 +02:00
56bafd7a6a Runtime: add new sed ftplugin (#12843) 2023-08-19 12:13:31 +02:00
07a2b61d4c patch 9.0.1736: Github Actions times out after 20 minutes
Problem: Github Actions times out after 20 minutes
Solution: Increase the timeout to 25 minutes

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-18 01:20:42 +02:00
d2af6c66fe patch 9.0.1733: CI: cannot cache linux-modules-extra
Problem: CI: cannot cache linux-modules-extra
Solution: Enable caching and reduce failed downloads

closes: #12779

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-17 23:45:08 +02:00
ba913b14dd patch 9.0.1713: Github CI fails to load snd-dummy kernel module
Problem: Github CI fails to load snd-dummy kernel module
Solution: Make installation of linux-modules-extra optional

linux-modules-extra package are not available on Ubuntu 22 at the
moment, which breaks CI runs. The change make its installation
conditional as the original `if-else` structure tried to do.

closes: #12801

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-15 22:34:45 +02:00
2f339aad6c Add syntax & ftplugin for pymanifest (#12773) 2023-08-13 10:26:20 +02:00
8f5a8d8a8b Update CODEOWNERS (#12760) 2023-08-11 19:30:55 +02:00
6efb198033 Updated runtime files
This is a collection of various PRs from github that all require a minor
patch number:

1) https://github.com/vim/vim/pull/12612

    Do not conflate dictionary key with end of block

2) https://github.com/vim/vim/pull/12729:

    When saving and restoring 'undolevels', the constructs `&undolevels` and
    `:set undolevels` are problematic.

    The construct `&undolevels` reads an unpredictable value; it will be the
    local option value (if one has been set), or the global option value
    (otherwise), making it unsuitable for saving a value for later
    restoration.

    Similarly, if a local option value has been set for 'undolevels',
    temporarily modifying the option via `:set undolevels` changes the local
    value as well as the global value, requiring extra work to restore both
    values.

    Saving and restoring the option value in one step via the construct
    `:let &undolevels = &undolevels` appears to make no changes to the
    'undolevels' option, but if a local option has been set to a different
    value than the global option, it has the unintended effect of changing
    the global 'undolevels' value to the local value.

    Update the documentation to explain these issues and recommend explicit
    use of global and local option values when saving and restoring.  Update
    some unit tests to use `g:undolevels`.

3) https://github.com/vim/vim/pull/12702:

    Problem:    Pip requirements files are not recognized.
    Solution:   Add a pattern to match pip requirements files.

4) https://github.com/vim/vim/pull/12688:

    Add indent file and tests for ABB Rapid

5) https://github.com/vim/vim/pull/12668:

    Use Lua 5.1 numeric escapes in tests and add to CI

    Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings.  Lua
    5.1 only supports decimal escapes:

    > A character in a string can also be specified by its numerical value
    > using the escape sequence \ddd, where ddd is a sequence of up to three
    > decimal digits. (Note that if a numerical escape is to be followed by a
    > digit, it must be expressed using exactly three digits.) Strings in Lua
    > can contain any 8-bit value, including embedded zeros, which can be
    > specified as '\0'.

    To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to
    run with Lua 5.1 as well as Lua 5.4

6) https://github.com/vim/vim/pull/12631:

    Add hurl filetype detection

7) https://github.com/vim/vim/pull/12573:

    Problem:   Files for haskell persistent library are not recognized
    Solution:  Add pattern persistentmodels for haskell persistent library

closes: #12612
closes: #12729
closes: #12702
closes: #12688
closes: #12668
closes: #12631
closes: #12573

Co-authored-by: lacygoill <lacygoill@lacygoill.me>
Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev>
Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 06:19:18 +02:00
1d7caa58e3 patch 9.0.1681: Build Failure with Perl 5.38
Problem: Build Failure with Perl 5.38
Solution: Fix Build Failure

closes: #12543, closes: #12575
2023-08-09 19:58:58 +02:00
982ded68b6 patch 9.0.1646: CI: codecov may take a very long time to run
Problem:    CI: codecov may take a very long time to run.
Solution:   Add a timeout. (Philip Heiduck, closes #12559)
2023-06-22 18:12:46 +01:00
7268e53996 patch 9.0.1562: mixing package managers is not a good idea
Problem:    Mixing package managers is not a good idea.
Solution:   Install gcc 13 with apt-get. (closes #12405)
2023-05-16 20:11:02 +01:00
b7398fe41c Update runtime files 2023-05-14 18:50:25 +01:00
b6a19594b2 patch 9.0.1553: CI: using slightly outdated gcc version
Problem:    CI: using slightly outdated gcc version.
Solution:   Use "brew" to get a more recent gcc version.  (closes #12391)
2023-05-13 18:05:20 +01:00
c416fd4ca8 patch 9.0.1552: CI: sound-dummy module is not installed
Problem:    CI: sound-dummy module is not installed.
Solution:   Invert using the result of the condition.  (closes #12394)
2023-05-13 17:46:10 +01:00
ff40b625a6 patch 9.0.1548: CI: check in sound-dummy module may throw an error
Problem:    CI: check in sound-dummy module may throw an error.
Solution:   Check whether apt-cache can show the package description.
            (Christian Brabandt, closes #12390)
2023-05-13 11:54:47 +01:00
12eb0f4ec5 patch 9.0.1547: Coveralls workflow on CI is commented out
Problem:    Coveralls workflow on CI is commented out.
Solution:   Remove the Coveralls workflow. (closes #12389)
2023-05-12 18:47:28 +01:00
e741f039cf patch 9.0.1541: CI: sound dummy is disabled
Problem:    CI: sound dummy is disabled.
Solution:   Make sound dummy work again. (closes #12380)
2023-05-11 15:22:58 +01:00
5fc7959dcb patch 9.0.1536: CI: sound dummy stopped working
Problem:    CI: sound dummy stopped working.
Solution:   Temporarily stop using sound dummy.
2023-05-09 22:13:58 +01:00
2f14716c46 patch 9.0.1489: crypt with libsodium is not tested on CI
Problem:    Crypt with libsodium is not tested on CI.
Solution:   Configure testing with libsodium. (Ozaki Kiichi, closes #12297)
2023-04-26 15:43:39 +01:00
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
9be736f2eb patch 9.0.1474: CI runs with old version of Ubuntu and tools
Problem:    CI runs with old version of Ubuntu and tools.
Solution:   Update CI to more recent versions. (closes #11092)
2023-04-21 19:51:22 +01:00
017227079f patch 9.0.1473: CI does not run sound tests
Problem:    CI does not run sound tests.
Solution:   Re-enable sound tests.  Use "apt-get" instead of "apt". (Ozaki
            Kiichi, closes #12280)
2023-04-21 17:46:57 +01:00
b0b6b8b07e patch 9.0.1384: setting HOMEBREW_NO_AUTO_UPDATE is not needed with version 4
Problem:    Setting HOMEBREW_NO_AUTO_UPDATE is not needed with Homebew version
            4.
Solution:   Remove setting HOMEBREW_NO_AUTO_UPDATE. (closes #12008)
2023-03-05 20:56:34 +00:00
43e234e8b4 patch 9.0.1289: a newer version of clang can be used for CI
Problem:    A newer version of clang can be used for CI.
Solution:   Switch from clang-15 to clang-16. (closes #11577)
2023-02-06 20:22:48 +00:00
192e24d974 patch 9.0.1253: CI adds repository unnecessarily
Problem:    CI adds repository unnecessarily.
Solution:   Remove the line from the workflow. (closes #11900)
2023-01-28 10:43:50 +00:00
1b5f03ec9c Update runtime files 2023-01-09 20:12:45 +00:00
f1dcd14fc5 Update runtime files 2022-12-31 15:30:45 +00:00
ef91ae4557 patch 9.0.1114: CI does not use the latest Python version
Problem:    CI does not use the latest Python version.
Solution:   Switch from Python 3.10 to 3.11. (closes #11761)
2022-12-30 17:41:17 +00:00
b5328b46a7 patch 9.0.1071: Codecov action version is too specific
Problem:    Codecov action version is too specific.
Solution:   Only use "v3" to automatically use the latest stable version.
            (closes #11720)
2022-12-17 15:47:45 +00:00
7db29e4b5c Update runtime files 2022-12-11 15:53:04 +00:00
ad85af5b38 patch 9.0.0946: CI: Error in Coverity flow is not reported
Problem:    CI: Error in Coverity flow is not reported.
Solution:   Use another way to avoid errors in a forked repository. (Ken
            Takata, closes #11609)
2022-11-25 00:57:05 +00:00
1273dfb015 patch 9.0.0941: CI failures in sound dummy
Problem:    CI failures in sound dummy.
Solution:   Temporarily disable building sound dummy. (closes #11610)
2022-11-24 15:15:08 +00:00
e2da59851a patch 9.0.0937: forked repositories send out useless email
Problem:    Forked repositories send out useless email.
Solution:   When Coverity fails to run just ignore it. (Shane-XB-Qian,
            closes #11604)
2022-11-24 12:01:45 +00:00
76db9e0763 Update runtime files 2022-11-09 21:21:04 +00:00