Repository navigation
Take 51degrees-cxx rc 865cee97 and generate the IP Intelligence wrapper again - #72
Draft
jwrosewell wants to merge 1 commit into
Draft
jwrosewell wants to merge 1 commit into
jwrosewell wants to merge 1 commit into
Conversation
…er again Moves the cxx submodule from e866f6d3, 4.5.103, to the 51degrees-cxx rc commit 865cee97. Generated hash_python_wrap.cxx, DeviceDetectionHashEngineModule.py, ipi_python_wrap.cxx and IpIntelligenceEngineModule.py again with SWIG 4.4.1, the version in the committed files, from the staged source the way PreBuild.sh does. Run against e866f6d3 the same command gives files byte for byte the same as the committed ones, so every difference comes from cxx. Only ipi_python_wrap.cxx changes. The four ConfigIpiSwig getters that return a CollectionConfig no longer pass SWIG_POINTER_OWN, because the cxx interface now scopes its newobject directives to MetaData and the configuration keeps ownership of those references. The Device Detection wrapper and both module files are unchanged. The setup.py files list the cxx sources by glob, so the new src/common/date.c is picked up with no change there.
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.
Moves the
cxxsubmodule frome866f6d3(4.5.103) to the 51degrees-cxxrccommit865cee97, so 51degrees-python takes the C library at the same commit as the other languages, and generates the SWIG wrappers again.cxx commits taken
Every pull request merged into 51degrees-cxx
rcbetween those two commits, from 51degrees-cxx:The range also holds documentation, example and CI pull requests that do not change
src(#96, #97, #98, #101, #102, #106, #108, #109, #111), pull requests #104 (free results and metadata in the examples and tests) and #105 (CMake package), and the merge of main into rc after release 4.5.103.(
git diff e866f6d 865cee97 -- srcchanges 65 files. Pull requests 118 and 139 merged intorcafter865cee97and are not in this move.)Wrappers
Python ships the two on-premise packages as source distributions and compiles the committed wrappers, so they are regenerated here.
pip install swig==4.4.1.PreBuild.shruns,swig -c++ -python hash_python.iandswig -c++ -python ipi_python.i, from the package source folder after the cxx source is staged into it assetup.pydoes.e866f6d3, the same command gavehash_python_wrap.cxx,DeviceDetectionHashEngineModule.py,ipi_python_wrap.cxxandIpIntelligenceEngineModule.pybyte for byte the same as the ones committed (emptygit statusandgit diff). Run: https://github.com/51Degrees/51degrees-python/actions/runs/42673222229865cee97changed onlyipi_python_wrap.cxx, in four lines. TheConfigIpiSwiggettersgetComponents,getProperties,getValuesandgetProfilesreturned aCollectionConfigwithSWIG_POINTER_OWNand now return it with0, because #122 scoped the%newobjectdirectives toMetaDataand the configuration owns those references.hash_python_wrap.cxx,DeviceDetectionHashEngineModule.pyandIpIntelligenceEngineModule.pycome out identical, so they are not in the diff.Build files
device-detection/.../setup.pyandip-intelligence/.../setup.pyfind the cxx C and C++ sources byglobovercommon,ddoripi(anddd/hashoripi/graph), andMANIFEST.inincludes*.h,*.hppand*.irecursively. Between the two commits one source file was added,src/common/date.c, and none was renamed or removed. The glob picks the new file up, so neithersetup.pychanges.Options
setLoadRequiredPropertiesOnly,setDefaultValuesInMemoryand the concurrency default are new in the C++ configuration. The existing profile calls indevicedetection_onpremise.pyandipintelligence_onpremise.py(setLowMemory,setMaxPerformance,setBalanced,setBalancedTemp,setHighPerformance,setConcurrencyand the rest) are unchanged in the C++ headers, and no new Python API is added.Verification
The full build does not pass yet, and the cause is in the C library, not in this repository's wrappers.
f804c54b(everySetting 'PullRequestSha'line matches). The first attempt failed before creating any build job (a "workflow file issue" with no detail, which cleared on a rerun). On the rerun, Windows_Python_3.13 failed in this job and the matrix then cancelled the other 14 jobs, so Ubuntu and macOS never reported a result. The UTM link lint check passed on a rerun after the same kind of start-up failure.error LNK2001: unresolved external symbol "public: __cdecl FiftyoneDegrees::Common::Date::Date(void)", and the same forDate::getDay,getMonth,getYearand theDate(const fiftyone_degrees_date_t *)constructor.src/common/date.cbeside the existingsrc/common/Date.cpp. The names differ only in case. This repository'ssetup.pycompiles the C files and the C++ files into the same build folder, so on a case-insensitive file system (Windows, and macOS by default) both writeDate.obj/date.objto one path. The CI builds each package twice in one tree (python setup.py build_clib build_ext --inplace, thenpip install .), and the second build sees theDate.objthe C compile left behind as newer thanDate.cpp, skips compilingDate.cpp, and socpplib.libholds no C++Date.date.crenamed todate_c.cin thecxxworking copy only, the same commands pass. A singlepip installin a fresh tree passes either way, which is why the problem only appears in the CI's two-step order._ppsuffix, as instring_pp.cpp), and it affects every language that compiles the sources into one folder. Python was not worked around insetup.py.No other job reported a failure, but the other 14 were cancelled before they finished, so they prove nothing. The SWIG wrapper check above ran on Linux and the Windows build reached the link step with the regenerated
hash_python_wrap.cxxandipi_python_wrap.cxxcompiling cleanly.What remains
Date.cppanddate.cname clash fixed before this builds on Windows or macOS (see Verification). The draft then needs a new full build.rchas moved on since865cee97(tod71ad22fat 18:21 UTC, with 118 and 139), and more drafts are still to merge. This draft will move again to the final commit.