robotpy / robotpy/semiwrap

Structure code so that `using Base::fn` can automatically bind from the base class

Open
#281 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7
Forks
3
Avg merge
18h 33m
Merged PRs (30d)
7

Description

So if you have:

class Foo : public Bar {
public:
    using Bar::fn;

   void fn(whatever w); 
};

Currently robotpy-build (a) doesn't know its a function and (b) fn is present in Foo, but only the overloads that are in Foo, not the ones that are in Bar.

I could imagine that we could setup functions that the base class makes available (maybe in its trampoline?) where the original base class .def statements are called, but they get added to the child class instead.

This would probably be annoying to set up, I'm not sure it's worth it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how robotpy-build recognizes using Base::fn and how base and child .def statements are generated, including any trampoline handling. The work is complete when fn is recognized as a function and the child exposes both its own overloads and the overloads inherited from Bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.