-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cli setup improvements #3939
cli setup improvements #3939
Conversation
e2bc070
to
6c5c7a5
Compare
6c5c7a5
to
e5eead1
Compare
@weiznich rebased, to check if tests are passing now 😉 |
To recursively create a directory and all of its parent components if they are missing.
e5eead1
to
02e0f76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR 👍 I'm generally fine with how this change is implemented and what it is supposed to change. The CI test failures on windows seem to be related to the change (and likely to the review comment left for the create_config_file
function). That needs to be fixed before merging as we also need to support windows there.
@weiznich I just found the reason for test errors: tests on windows are receiving an absolute path as |
As this might also be a potential problem if someone passes an absolute path manually to the CI, I would prefer an solution that just converts the path to an path relative to the |
Let's try with another solution, the problem could be that the string wrote in the .toml file must be escaped and I'm not doing that. I'm trying with let migrations_dir_toml_string = format!(
"dir = \"{}\"",
migrations_dir.display().to_string().replace('\\', "\\\\")
); Workflow here: https://github.com/dennybiasiolli/diesel/actions/runs/8005969731 |
Ok now it works! https://github.com/dennybiasiolli/diesel/actions/runs/8007224538 |
1a7fef5
to
d5cf157
Compare
"STDERR: Failed to execute a database query: Identifier name 'diesel_setup_writes_migration_dir_by_arg_to_config_file_escaping_windows_paths' is too long" This should be an easy fix 😰 |
d5cf157
to
d1be76c
Compare
d1be76c
to
8a4db85
Compare
The only failing check error now is this one: I think it shouldn't be. problem, but feel free to re-run the workflow just to be 100% sure 😉 |
cli: using fs::create_dir_all in create_migrations_directory
To recursively create a directory and all of its parent components if they are missing.
cli: writing the custom migration dir to the config file
cli: fixing windows paths in toml strings and adding a specific test for that