Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SWIG/Ruby compatibility check & warning #480

Merged
merged 1 commit into from Mar 26, 2020

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Mar 26, 2020

Ruby 2.7.0 contains some SWIG incompatibilities that weren't addressed until the (unreleased) SWIG 4.0.3, so if we detect the new Ruby version, emit a warning when generating the build. (The warning can be silenced by the user, as indicated.)

-- Found Ruby: /usr/bin/ruby (found version "2.6.5") 
CMake Warning at src/bindings/ruby/CMakeLists.txt:51 (message):
  

  Ruby 2.7.0+ detected, building the libopenshot Ruby API bindings requires a
  pre-release version of SWIG 4.0.3 with this commit:
  https://github.com/swig/swig/commit/5542cc228ad10bdc5c91107afb77c808c43bf2a4


-- 
To disable this warning, add -DSILENCE_RUBY_VERSION_WARNING:BOOL=1 to the cmake
 command line, or enable the option in the CMake GUI.

(I had temporarily set the version comparison down to 2.6.0 to force the warning for this test, since I'm not running Ruby 2.7.0 yet.)

Fixes #479

@codecov-io
Copy link

Codecov Report

Merging #480 into develop will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #480   +/-   ##
========================================
  Coverage    48.13%   48.13%           
========================================
  Files          128      128           
  Lines         9933     9933           
========================================
  Hits          4781     4781           
  Misses        5152     5152           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a5dfd9...489a371. Read the comment docs.

@ferdnyc ferdnyc merged commit 5e899bf into OpenShot:develop Mar 26, 2020
@ferdnyc ferdnyc deleted the ruby27-swig-warn branch March 26, 2020 03:07
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jun 1, 2020

Looks like this may have become a moot point, largely. I see that on both Fedora 32 and Ubuntu 20.04, SWIG 4.0.1 was subsequently patched to fix Ruby 2.7.0 support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ruby 2.7.0 overloaded rb_define_virtual_variable()
2 participants