Add GNU sed alternative for make-sync.sh#3017
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9af1cc6ee3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .get_table_name() | ||
| .expect("Checked above") | ||
| .clone(), | ||
| ) | ||
| .drop_constraint(drop_existing), |
There was a problem hiding this comment.
Keep dropping standalone unique indexes with DROP INDEX
When a Postgres sync removes a standalone unique index, this branch now always emits ALTER TABLE ... DROP CONSTRAINT. That works for column-level UNIQUE constraints, but supported unique indexes such as #[sea_orm(unique_key = ...)] are created via Index::create().unique() in schema/entity.rs, so there is no constraint of that name to drop. In that case sync() will fail instead of removing the stale index; the constraint-specific path needs to be limited to constraint-backed uniques.
Useful? React with 👍 / 👎.
| find tests -type f -name '*.rs' -exec sed -i '/use futures_util::StreamExt/d' {} + | ||
| find src -type f -name '*.rs' -exec sed -i 's/self.conn.try_lock()/self.conn.try_lock().ok()/' {} + | ||
| sed -i 's/self.conn.try_lock().ok()/self.conn.try_lock()/' ./src/driver/rusqlite.rs | ||
| cargo +nightly fmt |
There was a problem hiding this comment.
Avoid requiring nightly rustfmt in the new GNU sync script
The new GNU/Linux workflow now ends with cargo +nightly fmt, while the existing make-sync.sh still uses plain cargo fmt and the repo does not pin a nightly toolchain. On a common Linux setup that only has stable Rust installed, the documented bash build-tools/make-sync.gnu.sh path fails at the last step with a missing-toolchain error even though the sed transforms succeeded.
Useful? React with 👍 / 👎.
No description provided.