Add optional annotations for field/container names in Inlet
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 196
- Forks
- 34
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 11
Description
Inlet users may wish to annotate names of fields or containers, for example:
* *deprecated* fields that should result in a warning when used
* *renamed* fields that accept either the old or the new name
One way of implementing this without significantly changing Inlet's interface might be to introduce a lightweight AnnotatedName class:
```cpp
Table::addInt(AnnotatedName name, std::string description);
// ...all the other add* functions
class AnnotedName
{
AnnotedName(std::string); // implicit conversion for un-annotated names
static AnnotatedName deprecated(std::string deprecated_name, std::string message);
static AnnotatedName renamed(std::string old_name, std::string new_name);
};
// could be used like:
addInt("foo", "descr"); // normal
addInt(AnnotatedName::deprecated("foo", "we don't use this anymore"), "descr");
addInt(AnnonatedName::renamed("foo", "bar"), "descr"); // renamed foo -> bar
```
This might require a bit of refactoring (especially to perform multiple lookups for the same field in the input file), but should only affect a few parts of the internal implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Inlet's Table::add* functions and the internal input-field lookup implementation. Review how field and container names are currently stored and resolved, then determine how annotations could preserve the existing interface. Done should include deprecated-name warnings and renamed-name support, including lookup of both old and new names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100