robotpy / robotpy/semiwrap

Automatically Detect Template Types

Open
#275 4 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

When headers are scanned, the types used in a template should be cached. This can be used automatically fill in the template_params in create-gen.

For example (ctre pro),
CoreTalonFX.hpp has a function StatusSignalValue<units::angle::turn_t> &GetPosition();
From this, we know that StatusSignalValue needs a units::angle::turn_t template param.
Then, SignalStatusValue.hpp has a function SignalMeasurement<T> GetDataCopy() const {...}
From this, we can propogate all of SignalStatusValue's template_params including units::angle::turn_t to SignalMeasurement.

This would require all headers to be scanned before yaml files are written.

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 the header-scanning path and the create-gen handling of template_params, then determine how scanned types would be retained until YAML files are written. Use the CoreTalonFX.hpp and SignalStatusValue.hpp examples as expected propagation cases; done means template parameters are detected and automatically filled across these dependencies.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.