Skip to content

Commit

Permalink
Bump prism/rbi dev dependency (#1403)
Browse files Browse the repository at this point in the history
I get compilation errors on arch for this version of prism:

```
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/ext/prism
/home/user/.rbenv/versions/3.3.3/bin/ruby extconf.rb
checking for prism.h in /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/include... yes
checking for prism/extension.h in /home/user/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/prism-0.24.0/ext... yes
checking for whether -fvisibility=hidden is accepted as CFLAGS... yes
compiling build/static/prism.o
src/prism.c: In function ‘parser_lex_magic_comment’:
src/prism.c:6776:67: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 6776 |         if ((magic_comment = (pm_magic_comment_t *) calloc(sizeof(pm_magic_comment_t), 1)) != NULL) {
      |                                                                   ^~~~~~~~~~~~~~~~~~
src/prism.c:6776:67: note: earlier argument should specify number of elements, later size of each element
src/prism.c: In function ‘parser_comment’:
src/prism.c:8208:60: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 8208 |     pm_comment_t *comment = (pm_comment_t *) calloc(sizeof(pm_comment_t), 1);
      |                                                            ^~~~~~~~~~~~
src/prism.c:8208:60: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors
make: *** [Makefile:54: build/static/prism.o] Error 1
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include=${opt-dir}/include
        --without-opt-include
        --with-opt-lib=${opt-dir}/lib
        --without-opt-lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/home/user/.rbenv/versions/3.3.3/bin/$(RUBY_BASE_NAME)
        --enable-debug-mode-build
        --disable-debug-mode-build
extconf.rb:41:in `system': Command failed with exit 2: make (RuntimeError)
        from extconf.rb:41:in `block in make'
        from extconf.rb:40:in `chdir'
        from extconf.rb:40:in `make'
        from extconf.rb:92:in `<main>
```
  • Loading branch information
Earlopain committed Jul 8, 2024
1 parent ac8ac3c commit d6cf3de
Show file tree
Hide file tree
Showing 3 changed files with 21,110 additions and 12,891 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ GEM
racc
pg (1.5.4)
prettier_print (1.2.1)
prism (0.24.0)
prism (0.30.0)
protocol-hpack (1.4.2)
protocol-http (0.25.0)
protocol-http1 (0.16.0)
Expand Down Expand Up @@ -355,8 +355,8 @@ GEM
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.1.0)
rbi (0.1.9)
prism (>= 0.18.0, < 0.25)
rbi (0.1.13)
prism (>= 0.18.0, < 1.0.0)
sorbet-runtime (>= 0.5.9204)
rbtrace (0.5.1)
ffi (>= 1.0.6)
Expand Down
Loading

0 comments on commit d6cf3de

Please sign in to comment.