Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create simple mechanism to trigger codegeneration #1972

Open
RickWinter opened this issue Jan 7, 2025 · 1 comment
Open

Create simple mechanism to trigger codegeneration #1972

RickWinter opened this issue Jan 7, 2025 · 1 comment

Comments

@RickWinter
Copy link
Member

Something to the likes of
cargo generate

@heaths
Copy link
Member

heaths commented Jan 7, 2025

For context, I don't think this should be in a build.rs file. Even if it's conditionally triggered on an env var or something, anyone using our crates will require extra build time to compile a build.rs file to an executable, run it, and then generate source that likely wasn't even regenerated. You can add files and env vars to the watch list, but this still require extra build time and Rust is slow enough to build already.

TypeSpecs shouldn't be changing often enough to warrant this, IMO. But I could see providing a cargo xtask task or similar, or even just a build script under eng/scripts that not only takes care of a platform-agnostic and non-PATH-specific mechanism to executable tsp-client (e.g., #1966 at the time of this writing is Windows- and PATH-specific), but could even take care of acquisition of tsp-client if easy enough to do in a platform-agnostic way.

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

No branches or pull requests

2 participants