Skip to content

Add GNU sed alternative for make-sync.sh#3017

Merged
Huliiiiii merged 2 commits intoSeaQL:masterfrom
Huliiiiii:sync
Mar 22, 2026
Merged

Add GNU sed alternative for make-sync.sh#3017
Huliiiiii merged 2 commits intoSeaQL:masterfrom
Huliiiiii:sync

Conversation

@Huliiiiii
Copy link
Member

No description provided.

@Huliiiiii Huliiiiii changed the title Add GNU sed-compatible alternative for make-sync.sh Add GNU sed alternative for make-sync.sh Mar 22, 2026
@Huliiiiii Huliiiiii merged commit 389795f into SeaQL:master Mar 22, 2026
32 checks passed
@Huliiiiii Huliiiiii deleted the sync branch March 22, 2026 13:37
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +468 to +472
.get_table_name()
.expect("Checked above")
.clone(),
)
.drop_constraint(drop_existing),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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