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

Find a way to make sure it's only build if the schema is correct. #17

Open
meee-low opened this issue Sep 14, 2023 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@meee-low
Copy link
Owner

Currently we have to manually apply the migrations in advance to make sure it compiles:

diesel migration redo
diesel migration run

Or the build will fail, as it relies on definitions in the schema.rs file, which is auto-populated when migrations are ran.

The intended goal is for the main binary to be self-contained and not rely on running an external CLI command.

For release builds, it isn't a big problem, since it's not a problem to do it manually and embed everything into the compiled binary (at least I think we can pre-bake the binary).

@meee-low meee-low added enhancement New feature or request good first issue Good for newcomers labels Sep 14, 2023
@meee-low
Copy link
Owner Author

meee-low commented Sep 16, 2023

Would probably be in a build.rs script

Example:
bf644fe

The only problem with this one is that it runs on every build, making it too burdensome. Need to find the options to make it only run when the relevant files change.

@meee-low meee-low changed the title Find a way to make sure it's only run if the schema is correct. Find a way to make sure it's only build if the schema is correct. Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant