Fix arg.name → arg.arg_name in pywrap macros.j2#205
Conversation
Points submodule at elliejs/pywrap 499cd39 which fixes the arg.name → arg.arg_name bug in macros.j2 (CadQuery/pywrap#63). This is a dummy PR to verify that the fix builds correctly on all platforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@adam-urbanczyk I had to wait for my local action to finish up so I could safely delete the generated sources cache. https://github.com/elliejs/OCP/actions/runs/29472183070 this action is an example showing that upstream pywrap actually fails to generate valid sources right now. (yes, there are other commits in that chain, oops, but I didn't want to restart the action run and they don't materially affect the way the crash occurs) The reason all the CI pipelines keep succeeding with pywrap where it is is because the sources cache just looks for successfully generated sources from any point in history. when pywrap's submodule pointer updates, this doesn't trigger a regeneration of sources in OCP's CI pipeline. I can make a new PR to address the fact that this should probably be true if you agree. That PR would just add the pywrap short hash to the end of the generated sources artifact, so that when you go looking for eg OCP-src-Windows- in the cache, you have to look for OCP-src-Windows-[pywrap-hash] This keeps pywrap's head cleaner. EDIT: I was wrong, PR's run in the upstream's repo context, but CadQuery/OCP appears to have no cache members... I swear it used to, and my fork behaves this way to skip generation phase when possible... |
|
Note that master OCP does not pin master pywrap currently bur rather a different branch (cf. https://github.com/CadQuery/pywrap/tree/f378d84a6a3a0390f72d8128e2619ba73ef7074a). It actually does run fine and it has no caching. |
|
thanks, yeah. Talked with Jern and learned that same information. The pinned commit runs fine. head is the problem. |
|
The current situation with branches is somewhat messy. I will rectify it eventually, but I'm working on OCP8 right now. The ask here is to come up with a minimal set of changes that are required for FreeBSD. |
|
ok so treat CadQuery/pywrap@f378d84 as head? |
|
I'm not sure what you mean as HEAD in this context. This is the commit used for building OCP7.9 right now. With that being said, does pywrap on this commit actually need any changes for FreeBSD? NB: symbol dumping and the CMake template lives here. |
|
HEAD as in where we should be making changes from. Yes, we need one change in translation_unit.py. I also thought we needed to change the cmakelists in the jinja template so that when it's compiled into the txt form it retains those changes? |
|
Which change in the |
|
If you'd like me to base my edits to pywrap off f378d84, you'll need to give it a branch name so the pr can actually work. |
|
this is the pywrap commit needed: elliejs/pywrap@7536962 |
|
Here is the branch https://github.com/CadQuery/pywrap/tree/OCP79, please adjust the CMakeLists.j2 here and not in the pywrap repo though. |
|
I see that OCP has a CMakeLists.j2 too, but in local testing, the actual j2 file that seemed to render was the one in pywrap. That appears to still be true, and this explanation from claude appears to hold water:
This appears to make sense to me. Claude also offered a solution, but I don't want to open another pr without you agreeing that this is the right path forward (instead of eg changing the j2 in pywrap)
|
|
Pls, no more Claude suggested PRs. The release artifacts are clearly generated from the version in this repo (cf. minimum required delta between the two templates). How are you running the generation step? You should be using cmake and the CMakeLists from this repo (see also CI). |
|
oh I ran |
Summary
arg.name→arg.arg_namebug inmacros.j2:44(Fix arg.name → arg.arg_name in macros.j2 byref smart pointer wrapping pywrap#63)init_outputs_byrefusesarg.namewhich doesn't exist onArgInfo—Jinja2 silently renders it as empty string, producing broken C++ like
_ptr; _ptr = &;instead ofmyArg_ptr; myArg_ptr = &myArg;the commit; revert to CadQuery/pywrap once Fix arg.name → arg.arg_name in macros.j2 byref smart pointer wrapping pywrap#63 merges
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com