Package Details: tree-sitter-cpp 0.23.1-1

Git Clone URL: https://aur.archlinux.org/tree-sitter-cpp.git (read-only, click to copy)
Package Base: tree-sitter-cpp
Description: C++ grammar for tree-sitter
Upstream URL: https://github.com/tree-sitter/tree-sitter-cpp
Licenses: MIT
Groups: tree-sitter-grammars
Submitter: lmartinez-mirror
Maintainer: xiliuya
Last Packager: xiliuya
Votes: 0
Popularity: 0.000000
First Submitted: 2021-10-25 23:09 (UTC)
Last Updated: 2024-10-06 14:41 (UTC)

Latest Comments

xiliuya commented on 2024-07-07 07:14 (UTC)

some bug with 0.22.2 in emacs . if you don't like it.use 0.22.0.

aperez commented on 2024-05-25 11:54 (UTC)

This package is missing a nodejs makedepends and after adding that it conflicts with neovim:

error: failed to commit transaction (conflicting files)
tree-sitter-cpp: /usr/share/nvim/runtime/parser exists in filesystem (owned by neovim)

The following changes made the package build and install correctly; Neovim also recognizes the plugin (checked with :TSInstallInfo):

diff --git a/PKGBUILD b/PKGBUILD
index e787e02..7d135d7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ url="https://github.com/tree-sitter/tree-sitter-cpp"
 license=('MIT')
 groups=('tree-sitter-grammars')
 depends=('gcc-libs')
-makedepends=('tree-sitter' 'tree-sitter-cli')
+makedepends=('tree-sitter' 'tree-sitter-cli' nodejs)
 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
        "tree-sitter-c-0.21.0.tar.gz::https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.21.0.tar.gz")
 sha256sums=('f04d2f8cf2a5d22e5f819dbd49cdb6fc25b531debff464abfe0cab742c1148a5'
@@ -33,8 +33,8 @@ build() {

 package() {
    install -Dm 644 cpp-parser.so "$pkgdir/usr/lib/libtree-sitter-cpp.so"
-   install -d "$pkgdir/usr/share/nvim/runtime/parser/"
-   ln -s "/usr/lib/libtree-sitter-cpp.so" "$pkgdir/usr/share/nvim/runtime/parser/cpp.so"
+   install -d "$pkgdir/usr/lib/tree_sitter"
+   ln -s "/usr/lib/libtree-sitter-cpp.so" "$pkgdir/usr/lib/tree_sitter/cpp.so"
    cd "$pkgname-$pkgver"
    install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
    install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"

xiliuya commented on 2024-05-04 16:53 (UTC)

The issue of ugly dependencies, is there any better way to address it?

source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
       "tree-sitter-c-0.21.0.tar.gz::https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.21.0.tar.gz")

tsdh commented on 2023-07-28 18:42 (UTC) (edited on 2023-07-28 18:43 (UTC) by tsdh)

For what it's worth, it hangs with the below output for 2 or 3 minutes before the line with the progress bar disappears and the error shown in my first comment is printed.

aura >>= Building tree-sitter-cpp...
==> Making package: tree-sitter-cpp 0.20.0-2 (Fr 28 Jul 2023 20:35:26 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading tree-sitter-cpp-0.20.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  492k    0  492k    0     0   576k      0 --:--:-- --:--:-- --:--:--  576k
==> Validating source files with sha256sums...
    tree-sitter-cpp-0.20.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting tree-sitter-cpp-0.20.0.tar.gz with bsdtar
==> Starting prepare()...
(##################) ⠋ reify:tree-sitter-c: http fetch GET 200 https://registry.npmjs.org/tree-sitter-c/-/tree-sitter-c-0.20.4.tgz 1515ms (cache miss)

That's a really nasty progress bar which simply disappears when a step fails instead of showing it prominently.

Anyway, the link https://registry.npmjs.org/tree-sitter-c/-/tree-sitter-c-0.20.4.tgz works just fine. I can download that without issues.

bhrgunatha commented on 2023-07-28 03:08 (UTC) (edited on 2023-07-28 03:09 (UTC) by bhrgunatha)

Same here as tsdh except yay adds a little extra info but doesn't seem very useful

==> ERROR: A failure occurred in prepare().
    Aborting...
 -> error making: tree-sitter-cpp-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
tree-sitter-cpp - exit status 4

tsdh commented on 2023-07-21 06:17 (UTC)

tree-sitter-cpp-0.20.0-2 fails to build for me.

sudo aura -Auax 
aura >>= Fetching package information...
aura >>= Comparing package versions...
aura >>= AUR Packages to upgrade:
tree-sitter-cpp :: 0.20.0-1 -> 0.20.0-2

aura >>= Saved package state.
aura >>= Determining dependencies...
aura >>= AUR Packages:
tree-sitter-cpp
aura >>= Continue? [Y/n] y
aura >>= Building tree-sitter-cpp...
==> Making package: tree-sitter-cpp 0.20.0-2 (Fr 21 Jul 2023 08:14:24 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading tree-sitter-cpp-0.20.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  492k    0  492k    0     0   618k      0 --:--:-- --:--:-- --:--:-- 1642k
==> Validating source files with sha256sums...
    tree-sitter-cpp-0.20.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting tree-sitter-cpp-0.20.0.tar.gz with bsdtar
==> Starting prepare()...

added 3 packages, and audited 4 packages in 2m

found 0 vulnerabilities
Unresolved conflict for symbol sequence:

  'nullptr'  •  '...'  …

Possible interpretations:

  1:  (null  'nullptr')  •  '...'  …
  2:  (nullptr  'nullptr')  •  '...'  …

Possible resolutions:

  1:  Specify a higher precedence in `null` than in the other rules.
  2:  Specify a higher precedence in `nullptr` than in the other rules.
  3:  Add a conflict for these rules: `null`, `nullptr`

==> ERROR: A failure occurred in prepare().
    Aborting...
aura >>= There was a makepkg failure.