oggy / looksee

Supercharged method introspection in IRB
MIT License
364 stars 14 forks source link

Ruby 2.7 will be release soon, thank you. #51

Closed zw963 closed 4 years ago

mathieujobin commented 4 years ago

Have you tried it?

mathieujobin commented 4 years ago

looks like it does not compile...

$ ruby -v
ruby 2.7.0dev (2019-12-23T13:46:58Z trunk 9a42e0c7ed) [x86_64-linux]
$ gem install looksee
Building native extensions. This could take a while...
ERROR:  Error installing looksee:
        ERROR: Failed to build gem native extension.

    current directory: /home/mathieu/.rvm/rubies/ruby-head/lib/ruby/gems/2.7.0/gems/looksee-4.1.0/ext
/home/mathieu/.rvm/rubies/ruby-head/bin/ruby -I /home/mathieu/.rvm/rubies/ruby-head/lib/ruby/2.7.0 -r ./siteconf20191223-31044-56184p.rb extconf.rb
creating Makefile

current directory: /home/mathieu/.rvm/rubies/ruby-head/lib/ruby/gems/2.7.0/gems/looksee-4.1.0/ext
make "DESTDIR=" clean

current directory: /home/mathieu/.rvm/rubies/ruby-head/lib/ruby/gems/2.7.0/gems/looksee-4.1.0/ext
make "DESTDIR="
compiling mri/mri.c
In file included from mri/2.3.0/method.h:14,
                 from mri/mri.c:7:
mri/2.3.0/internal.h:48: warning: "WARN_UNUSED_RESULT" redefined
   48 | #define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
      | 
In file included from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby/ruby.h:24,
                 from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby.h:33,
                 from mri/mri.c:1:
/home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/x86_64-linux/ruby/config.h:151: note: this is the location of the previous definition
  151 | #define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
      | 
In file included from mri/2.3.0/method.h:14,
                 from mri/mri.c:7:
mri/2.3.0/internal.h:70: warning: "GCC_VERSION_SINCE" redefined
   70 | #define GCC_VERSION_SINCE(major, minor, patchlevel) \
      | 
In file included from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby/ruby.h:29,
                 from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby.h:33,
                 from mri/mri.c:1:
/home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby/defines.h:65: note: this is the location of the previous definition
   65 | #  define GCC_VERSION_SINCE(major, minor, patchlevel) \
      | 
In file included from mri/2.3.0/method.h:14,
                 from mri/mri.c:7:
mri/2.3.0/internal.h:84:30: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
   84 | #if GCC_VERSION_SINCE(4, 6, 0) || __has_extension(c_static_assert)
      |                              ^
mri/2.3.0/internal.h:84:30: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
In file included from mri/2.3.0/method.h:14,
                 from mri/mri.c:7:
mri/2.3.0/internal.h:1363:11: error: conflicting types for ‘rb_st_copy’
 1363 | st_table *rb_st_copy(VALUE obj, struct st_table *orig_tbl);
      |           ^~~~~~~~~~
In file included from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby/intern.h:39,
                 from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby/ruby.h:2148,
                 from /home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby.h:33,
                 from mri/mri.c:1:
/home/mathieu/.rvm/rubies/ruby-head/include/ruby-2.7.0/ruby/st.h:161:11: note: previous declaration of ‘rb_st_copy’ was here
  161 | st_table *rb_st_copy(st_table *);
      |           ^~~~~~~~~~
mri/mri.c:15:12: warning: ‘add_method_if_undefined’ defined but not used [-Wunused-function]
   15 | static int add_method_if_undefined(ID method_name, rb_method_entry_t *me, VALUE *names) {
      |            ^~~~~~~~~~~~~~~~~~~~~~~
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
make: *** [Makefile:245: mri.o] Error 1

make failed, exit code 2

actual error

mri/2.3.0/internal.h:1363:11: error: conflicting types for ‘rb_st_copy’
 1363 | st_table *rb_st_copy(VALUE obj, struct st_table *orig_tbl);
kapso commented 4 years ago

Yea getting the same issue, it won't compile.

mathieujobin commented 4 years ago

this commit is of interest I believe a good lead in fixing it

https://github.com/ruby/ruby/commit/5f35b8ca30cba69968d4d0c885a4bf5c48b03e17

mathieujobin commented 4 years ago

feel free to give this a try https://github.com/oggy/looksee/pull/52

oggy commented 4 years ago

Pushed 4.2.0 -- give that a shot.

Thanks!