Skip to content

Conversation

@paolobarbolini
Copy link
Contributor

Turns out #3665 didn't fully fix the build for loongarch64 and s390x because the promptly crate depends on an old version of nix. While looking more into it I found that promptly is unmaintained and is used very little (judging by the reverse dependencies on crates.io and number of downloads). I've decided to replace it with dialoguer, maintained by console-rs org from which other crates sqlx-cli is already depending on.

This also happens to reduce the number of indirect dependencies, which is nice.

@abonander
Copy link
Collaborator

Ironically, we previously replaced dialoguer with promptly to fix #1109

Did dialoguer address this?

@abonander
Copy link
Collaborator

Alternatively, since we don't really need anything super fancy, we could just roll our own prompts, couldn't we?

@abonander
Copy link
Collaborator

If it's a just a matter of handling Ctrl-C/SIGINT, we can do that through Tokio, but we'd need to run the dialoguer prompt in a blocking task so it doesn't block the runtime.

@paolobarbolini
Copy link
Contributor Author

Did dialoguer address this?

It still happens.

If I understand correctly, it's the opinion of the dependecy's developers that this should be handled by users of the crate

Disappointing 🙄

If it's a just a matter of handling Ctrl-C/SIGINT, we can do that through Tokio, but we'd need to run the dialoguer prompt in a blocking task so it doesn't block the runtime.

I may have a simpler idea but first I have to figure out how to restore the cursor.

@abonander
Copy link
Collaborator

I may have a simpler idea but first I have to figure out how to restore the cursor.

console-rs/dialoguer#22 (comment)

Copy link
Contributor Author

@paolobarbolini paolobarbolini left a comment

Choose a reason for hiding this comment

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

What I was thinking didn't really work. I've tried this other way but it too had problems 🙄

@abonander abonander merged commit 277dd36 into launchbadge:main Feb 27, 2025
81 checks passed
jayy-lmao pushed a commit to jayy-lmao/sqlx that referenced this pull request Mar 1, 2025
abonander added a commit that referenced this pull request Mar 2, 2025
* feat: add geometry path

* fix: paths to pg point

* test: remove array tests for path

* Fix readme: uuid feature is gating for all repos (#3720)

The readme previously stated that the uuid feature is only for postres but it actually also gates the functionality in mysql and sqlite.

* Replace some futures_util APIs with std variants (#3721)

* feat(sqlx-cli): Add flag to disable automatic loading of .env files (#3724)

* Add flag to disable automatic loading of .env files

* Update sqlx-cli/src/opt.rs

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

---------

Co-authored-by: Austin Bonander <austin.bonander@gmail.com>

* chore: expose bstr feature (#3714)

* chore: replace rustls-pemfile with rustls-pki-types (#3725)

* QueryBuilder: add `debug_assert` when `push_values` is passed an empty set of tuples (#3734)

* throw a warning in tracing so that the empty tuples would be noticed

* use debug assertion to throw a panic in debug mode

* fix: merge conflicts

* chore(cli): remove unused async-trait crate from dependencies (#3754)

* Update pull_request_template.md

* Fix example calculation (#3741)

* Avoid privilege requirements by using an advisory lock in test setup (postgres). (#3753)

* feat(sqlx-postgres): use advisory lock to avoid setup race condition

* fix(sqlx-postgres): numeric hex constants not supported before postgres 16

* Small doc correction. (#3755)

When sqlx-core/src/from_row.rs was updated to implement FromRow for tuples of up to 16 values, a comment was left stating that it was implemented up to tuples of 9 values.

* Update FAQ.md

* refactor(cli): replace promptly with dialoguer (#3669)

* docs(pool): recommend actix-web ThinData over Data to avoid two Arcs (#3762)

Both actix_web::web::Data and sqlx::PgPool internally wrap an Arc. Thus,
using Data<PgPool> as an extractor in an actix-web route handler results
in two Arcs wrapping the data of interest, which isn't ideal.

Actix-web 4.9.0 introduced a new web::ThinData extractor for cases like
this, where the data is already wrapped in an `Arc` (or is otherwise
similarly cheap and sensible to simply clone), which doesn't wrap the
inner value in a (second) Arc.

Since the new extractor is better suited to the task, suggest it in
place of web::Data when giving an example on how to share a pool.

* fix: merge conflicts

* fix: use types mod from main

* fix: merge conflicts

* fix: merge conflicts

* fix: merge conflicts

* fix: ordering of types mod

* fix: path import

* test: no array test for path

---------

Co-authored-by: Jon Thacker <thacker.jon@gmail.com>
Co-authored-by: Paolo Barbolini <paolo.barbolini@m4ss.net>
Co-authored-by: Ben Wilber <benwilber@users.noreply.github.com>
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
Co-authored-by: joeydewaal <99046430+joeydewaal@users.noreply.github.com>
Co-authored-by: tottoto <tottotodev@gmail.com>
Co-authored-by: Ethan Wang <mailme@ethanavania.org>
Co-authored-by: Stefan Schindler <dns2utf8@users.noreply.github.com>
Co-authored-by: kildrens <5198060+kildrens@users.noreply.github.com>
Co-authored-by: Marti Serra <marti.serra+github@protonmail.com>
Co-authored-by: Jonas Malaco <jonas@protocubo.io>
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.

2 participants