Skip to content

Add diagnostics to help users know when to insert typealias: - #323

Closed
virtuald wants to merge 26 commits into
mainfrom
typealias-diagnostics
Closed

virtuald wants to merge 26 commits into
mainfrom
typealias-diagnostics

Conversation

@virtuald

Copy link
Copy Markdown
Member

The result is that lines like the following get inserted into the various autogenerated files:

  // semiwrap diagnostic: if this line fails because `XXX` is unknown,
  // add a typealias entry for `XXX` to /absolute/path/to/Whatever.yml.
  using semiwrap_typealias_probe_XXX__add_typealias_to_yaml [[maybe_unused]] = XXX;

If XXX fails to resolve then the compiler error is hopefully a little more helpful, but maybe at the expense of additional symbols in the binary (maybe we can tell the compiler to not export it?)

However, if we were smarter about using namespaces in semiwrap, perhaps some of this wouldn't be needed.

Currently this is 100% slop and I haven't manually reviewed it yet. However, it can build mostrobotpy in its current state, so that implies it's not totally broken?

@virtuald

Copy link
Copy Markdown
Member Author

I don't think this is necessary anymore because of #329

@virtuald virtuald closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant