I did not see the ffi-clang requirement pinned or documented anywhere, but versions of ffi-clang newer than 0.8.0 move the visit_children method and cause a runtime error in extract_source.rb:
extract_source.rb:260:in `analyze_file': undefined method `visit_children' for an instance of FFI::Clang::Cursor (NoMethodError)
cursor.visit_children do |cursor, parent|
^^^^^^^^^^^^^^^
What
This PR surrounds the definition of the
NAMEDATALEN
constant with an#ifndef
.Why
Increasing
NAMEDATALEN
allows you to, for example, avoid the truncation normally produced by the postgres parser on this 65 character identifier:Notes
To generate this PR and validate it, I needed to run
make extract_source
.To get
make extract_source
working, I needed these 3 pre-requisites:xcrun
inside ofextract_source.rb
.sed -i ""
invocations peppered throughoutMakefile
(example).3.1.2
.gem
ffi-clang 0.8.0
gem install ffi-clang --version'0.8.0'
ffi-clang
requirement pinned or documented anywhere, but versions offfi-clang
newer than0.8.0
move thevisit_children
method and cause a runtime error inextract_source.rb
:cursor.visit_children do |cursor, parent| ^^^^^^^^^^^^^^^