-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CI builds for CFFI (as of 9 May 2021) #2200
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
base: master
Are you sure you want to change the base?
Conversation
Add cffi Travis build
Unfortunately we've stopped using travis now, because travis stopped really usefully supporting FOSS projects. The Linux CI is now using github actions. |
I've updated the CI to use GHA (only the Linux build as we no longer seem to have macos jobs - not sure if there's a good reason for that, but adding the first macos job is harder than just adding another Linux job). |
Unfortunately the CFFI job failed - I haven't looked into why: https://github.com/swig/swig/runs/5442188613?check_suite_focus=true |
Oh, I think it's that the env vars need setting for the build too. |
OK, the cffi CI now passes! @egao1980 What's left to do? |
@@ -0,0 +1,3 @@ | |||
{ | |||
"makefile.extensionOutputFolder": "./.vscode" | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea about vscode, but this really seems more like a local preference that something that should be in the git repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is VSC specific. No idea if this should be part of the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it shouldn't. You can add .vscode
into ~/.gitignore
(your user gitignore) and then add this ignore file to ~/.gitconfig
[core]
excludesfile = /path/to/user/.gitignore
This is the best place for host-specific and user-specific artifacts.
@egao1980 I managed to get the CI to pass - what's left to do here? Even if we're not ready to promote CFFI to "supported" status, it would be good to merge the bulk of these updates if we're at the point where they should only be improving the situation. |
Amazing @ojwb ! As far as I remember that was all I was asked to fix. So please go ahead with the pull request. |
There is some reference to Lisp instead of CFFI in this patch. Can we make this consistent please, that is, use one or the other. So, I think this will just entail renaming Lisp.html to CFFI.html. Is there a case for adding in other Lisp variants to SWIG? |
CFFI is a Lisp library that is one of the ways to interface to native libraries from Common Lisp. Similar to JNI /JNA in Java. |
Congrats on getting the test-suite to run and for bringing this back to life. Hardly any tests seem to run on Github Actions though. It doesn't look like any C++ tests are being run. The full requirements to be considered for experimental status are documented here: https://htmlpreview.github.io/?https://github.com/swig/swig/blob/master/Doc/Manual/Extending.html#Extending_language_status. I suggest you create a set of tick boxes from this in this pull request ticking the items you think that meet the experimental status and then I'll check/review. A couple of standout problems are the required missing examples and I don't consider the documentation to be ready. Could you please spend a bit of time enhancing it. Python and Java are good reference chapters. I'd say that the guiding principle is to have lots of small easy to understand examples covering various C/C++ features. Documenting cffi typemaps and providing example usage of them is essential. The documentation on the various CFFI features does not read well to me, I don't understand it. I think they should be covered at a time with clear motivation and examples. |
Thanks for the feedback. C++ tests are missing due to lack of C++ support:) everything else could be added later as this PR is just to restore CFFI that was removed from SWIG a year ago. |
Looking at the experimental status requirements:
Apparently no C++ support yet.
This patch adds references to Lisp.html, but Lisp.html itself seems to be missing from the patch so I can't judge what it might contain. @egao1980 Did you write Lisp.html but fail to
There aren't any examples yet.
There don't seem to be any
Testsuite as it stands passes, so this seems to be fully satisfied.
The test-suite is fully functioning in CI. No examples currently, but if there were I think they'd also work in CI. I originally said:
I'd not considered when I wrote that that we can't actually enable CI for cffi until we are at the point of at least setting cffi to "experimental" status, so the benefits of merging most of this without any status change seem less clear to me and you'd need to rebuild a branch with the remaining changes if I merge part of it. @egao1980 Thoughts? |
We're about to release swig-4.1.0 and as the criteria for reviving CFFI to experimental status has stalled, I have gone ahead with the complete removal of CFFI as the second and final stage of disabling a number of languages that began in swig-4.0.0, see #2009. Anyone interested in reviving CFFI should revert cea25ab, then possibly apply the patch from this pull request as a starting point to meeting experimental status. |
@egao1980 It looks like you failed to |
Oh wait, I just realised that file existed before wsfulton removed the CFFI support in cea25ab, so if someone reverts that commit and then applies the changes here they will have Lisp.html (though it's presumably in need of updating). |
Yep, I'll try to get back to this this month :) |
Once #2990 is merged, The It looks like |
This is my latest code with all the fixes for CI builds for CFFI. Last time I've checked those were working.