Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes three critical bugs preventing FFIGenerate from working: a missing empty.h file, an incorrect file path, and a module loading order issue.
Changes:
- Added the missing
lib/ffi_generator/empty.hfile that was referenced in the gemspec - Fixed the path to empty.h in translation_unit.rb from
./empty.hto../empty.h - Pre-defined
FFIGenerate::Clangmodule to prevent NameError when loading nested moduleFFIGenerate::Clang::C
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/ffi_generator/empty.h | Added missing empty header file required by gemspec and translation unit parser |
| lib/ffi_generator/clang/translation_unit.rb | Corrected path to empty.h from clang subdirectory to parent directory |
| lib/ffi_generator.rb | Pre-defined module hierarchy to prevent loading errors with nested module syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently
FFIGeneratedoesn't work.There's 3 issues:
ffi_generator.gemspecaddslib/ffi_generator/empty.hfile but it's not presentlib/ffi_generator/clang/translation_unit.rbtries to uselib/ffi_generator/clang/empty.hwhich doesn't existffi_generator/clang/cis imported first which tries to createFFIGenerate::Clang::CbeforeFFIGenerate::Clanghas been created.This PR fixes all these issues.