Commit Graph

16990 Commits

Author SHA1 Message Date
renovate[bot]
5d5ae1ec6f
Update Rust crate bindgen to 0.70.0 (#17024)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bindgen](https://rust-lang.github.io/rust-bindgen/)
([source](https://togithub.com/rust-lang/rust-bindgen)) |
build-dependencies | minor | `0.65.1` -> `0.70.0` |

---

### Release Notes

<details>
<summary>rust-lang/rust-bindgen (bindgen)</summary>

###
[`v0.70.1`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0701-2024-08-20)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.70.0...v0.70.1)

#### Added

#### Changed

#### Removed

#### Fixed

- Fix regression where the `const` layout tests were triggering the
`unnecessary_operation` and `identity_op` clippy warnings.

#### Security

###
[`v0.70.0`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0700-2024-08-16)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.69.4...v0.70.0)

#### Added

-   Add target mappings for riscv64imac and riscv32imafc.
- Add a complex macro fallback API
([#&#8203;2779](https://togithub.com/rust-lang/rust-bindgen/issues/2779)).
- Add option to use DST structs for flexible arrays (--flexarray-dst,
[#&#8203;2772](https://togithub.com/rust-lang/rust-bindgen/issues/2772)).
- Add option to dynamically load variables
([#&#8203;2812](https://togithub.com/rust-lang/rust-bindgen/issues/2812)).
- Add option in CLI to use rustified non-exhaustive enums
(--rustified-non-exhaustive-enum,
[#&#8203;2847](https://togithub.com/rust-lang/rust-bindgen/issues/2847)).

#### Changed

- Remove which and lazy-static dependencies
([#&#8203;2809](https://togithub.com/rust-lang/rust-bindgen/issues/2809),
[#&#8203;2817](https://togithub.com/rust-lang/rust-bindgen/issues/2817)).
- Generate compile-time layout tests
([#&#8203;2787](https://togithub.com/rust-lang/rust-bindgen/issues/2787)).
- Print `bindgen-cli` errors to stderr instead of stdout
([#&#8203;2840](https://togithub.com/rust-lang/rust-bindgen/issues/2840))

#### Removed

#### Fixed

- Fix `--formatter=prettyplease` not working in `bindgen-cli` by adding
`prettyplease` feature and
enabling it by default for `bindgen-cli`
([#&#8203;2789](https://togithub.com/rust-lang/rust-bindgen/issues/2789))
.
- Fix `--allowlist-item` so anonymous enums are no longer ignored
([#&#8203;2827](https://togithub.com/rust-lang/rust-bindgen/issues/2827)).
- Use clang_getFileLocation instead of clang_getSpellingLocation to fix
clang-trunk
([#&#8203;2824](https://togithub.com/rust-lang/rust-bindgen/issues/2824)).
- Fix generated constants: `f64::INFINITY`, `f64::NEG_ INFINITY`,
`f64::NAN`
([#&#8203;2854](https://togithub.com/rust-lang/rust-bindgen/issues/2854)).

#### Security

- Update `tempfile` and `rustix` due to
[GHSA-c827-hfw6-qwvm](https://togithub.com/advisories/GHSA-c827-hfw6-qwvm).

###
[`v0.69.4`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0694-2024-02-04)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.69.3...v0.69.4)

#### Added

#### Changed

- Allow older itertools.
([#&#8203;2745](https://togithub.com/rust-lang/rust-bindgen/issues/2745))

#### Removed

#### Fixed

#### Security

###
[`v0.69.3`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0693-2024-02-04)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.69.2...v0.69.3)

#### Added

- Added blocklist_var
([#&#8203;2731](https://togithub.com/rust-lang/rust-bindgen/issues/2731))
- Stabilized thiscall_abi
([#&#8203;2661](https://togithub.com/rust-lang/rust-bindgen/issues/2661))

#### Changed

- Use CR consistently on windows
([#&#8203;2698](https://togithub.com/rust-lang/rust-bindgen/issues/2698))
- Replaced peeking_take_while by itertools
([#&#8203;2724](https://togithub.com/rust-lang/rust-bindgen/issues/2724))

#### Removed

#### Fixed

- Try to avoid repr(packed) for explicitly aligned types when not needed
([#&#8203;2734](https://togithub.com/rust-lang/rust-bindgen/issues/2734))
- Improved destructor handling on Windows
([#&#8203;2663](https://togithub.com/rust-lang/rust-bindgen/issues/2663))
- Support Float16
([#&#8203;2667](https://togithub.com/rust-lang/rust-bindgen/issues/2667))
- Fix alignment contribution from bitfields
([#&#8203;2680](https://togithub.com/rust-lang/rust-bindgen/issues/2680))
-   Fixed msrv build.

#### Security

-   Updated shlex dependency (RUSTSEC-2024-0006)

###
[`v0.69.2`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0692-2024-01-13)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.69.1...v0.69.2)

#### Added

#### Changed

#### Removed

#### Fixed

- Fixed generation of extern "C" blocks with llvm 18+. See
[#&#8203;2689](https://togithub.com/rust-lang/rust-bindgen/issues/2689).

#### Security

###
[`v0.69.1`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0691-2023-11-02)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.69.0...v0.69.1)

#### Fixed

-   Allow to run `bindgen -v` without an input header argument.

###
[`v0.69.0`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0690-2023-11-01)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.68.1...v0.69.0)

#### Added

- Added the `ParseCallbacks::header_file` callback which runs on every
filename passed to `Builder::header`.
- Added the `CargoCallbacks::new` constructor which emits a cargo-rerun
line
    for every input header file by default.
- Added the `CargoCallbacks::rerun_on_header_files` method to configure
whether
    a cargo-rerun line should be emitted for every input header file.

#### Changed

- The `--wrap-static-fns` feature was updated so function types that has
no
    argument use `void` as its sole argument.
-   `CargoCallbacks` is no longer a [unit-like
struct](https://doc.rust-lang.org/reference/items/structs.html) and the
`CargoCallbacks` constant was added to mitigate the breaking nature of
this
change. This constant has been marked as deprecated and users will have
to
    use the new `CargoCallbacks::new` method in the future.

#### Removed

#### Fixed

-   Allow compiling `bindgen-cli` with a static libclang.
- Emit an opaque integer type for pointer types that don't have the same
size
    as the target's pointer size.
- Avoid escaping Objective-C method names unless they are `Self`,
`self`,
    `crate` or `super`.

#### Security

###
[`v0.68.1`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0681)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.68.0...v0.68.1)

#### Fixed

-   Fixed errors on the windows artifact build process.

###
[`v0.68.0`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0680)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.66.1...v0.68.0)

#### Added

- The `system` ABI is now supported as an option for the
`--override-abi` flag.
- The `allowlist_item` method and the `--allowlist-item` flag have been
    included to filter items regardless or their kind.
-   Include installers as release artifacts on Github.

#### Changed

- The `Clone` implementation for `_BindgenUnionField` has been changed
to pass
    the `incorrect_clone_impl_on_copy_type` Clippy lint.
- The `c_unwind` ABI can be used without a feature gate for any Rust
target version
    equal to or greater than 1.71.
    This comes as a result of the ABI being stabilised (in Rust 1.71).
- Formatting changes when using prettyplease as a formatter due to a new
    prettyplease version.
- Avoid generating invalid `CStr` constants when using the
`--generate-cstr`
    option.

#### Removed

- The `extra_assert` and `extra_assert_eq` macros are no longer
exported.

#### Fixed

- Bindgen no longer panics when parsing an objective-C header that
includes a
Rust keyword that cannot be a raw identifier, such as: `self`, `crate`,
    `super` or `Self`.

###
[`v0.66.1`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0661)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.66.0...v0.66.1)

#### Removed

- Revert source order sorting
([#&#8203;2543](https://togithub.com/rust-lang/rust-bindgen/issues/2543))
due to correctness regressions
[#&#8203;2558](https://togithub.com/rust-lang/rust-bindgen/issues/2558).

###
[`v0.66.0`](https://togithub.com/rust-lang/rust-bindgen/blob/HEAD/CHANGELOG.md#0660)

[Compare
Source](https://togithub.com/rust-lang/rust-bindgen/compare/v0.65.1...v0.66.0)

#### Added

- Added the `--generate-cstr` CLI flag to generate string constants as
`&CStr`
    instead of `&[u8]`. (Requires Rust 1.59 or higher.)
- Added the `--generate-shell-completions` CLI flag to generate
completions for
    different shells.
- The `--wrap-static-fns` option can now wrap `va_list` functions as
variadic functions
    with the experimental `ParseCallbacks::wrap_as_variadic_fn` method.
-   Add target mappings for riscv32imc and riscv32imac.
- Add the `ParseCallbacks::field_visibility` method to modify field
visibility.

#### Changed

- Non-UTF-8 string constants are now generated as references (`&[u8;
SIZE]`)
    instead of arrays (`[u8; SIZE]`) to match UTF-8 strings.
- Wrappers for static functions that return `void` no longer contain a
`return`
    statement and only call the static function instead.
- The `--wrap-static-fns` option no longer emits wrappers for static
variadic
    functions.
- Depfiles generated with `--depfile` or `Builder::depfile` will now
properly
generate module names and paths that include spaces by escaping them. To
make
    the escaping clear and consistent, backslashes are also escaped.
- Updated `bitflags` dependency to 2.2.1. This changes the API of
`CodegenConfig`.
- Prettyplease formatting is gated by an optional, enabled by default
Cargo
    feature when depending on `bindgen` as a library.
- Items are now parsed in the order they appear in source files. This
may result in
    auto-generated `_bindgen_*` names having a different index.
- Use default visibility for padding fields: Previously, padding fields
were
always public. Now, they follow the default visibility for the type they
are
    in.
- Compute visibility of bitfield unit based on actual field visibility:
A
bitfield unit field and its related functions now have their visibility
determined based on the most private between the default visibility and
the
    actual visibility of the bitfields within the unit.

#### Removed

-   Remove redundant Cargo features, which were all implicit:
- bindgen-cli: `env_logger` and `log` removed in favor of `logging`
    -   bindgen (lib):
        -   `log` removed in favor of `logging`
        -   `which` removed in favor of `which-logging`
        -   `annotate-snippets` removed in favor of `experimental`

-   Prettyplease is available as a `Formatter` variant now.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-28 22:12:49 -07:00
everdrone
bf6767bc81
Improve Rust highlight queries (#16747)
Release Notes:

- Add `@variable.parameter` highlight scope

![parameters are colored
pink](https://github.com/user-attachments/assets/68920017-b191-4779-9aa6-856831938480)

- Add `@attribute` highlight scope

![attributes are colored
yellow](https://github.com/user-attachments/assets/558d6ce0-5e4c-4ecb-893c-bc8f88d63829)

- Add markdown injection inside `doc_comment`s

![markdown
highlighting](https://github.com/user-attachments/assets/93ef4cf6-5ac1-46c6-80d0-82ca7bee0447)
2024-08-28 22:08:23 -07:00
renovate[bot]
eb0b6d57e3
Update Rust crate cocoa to 0.26 (#17036)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [cocoa](https://togithub.com/servo/core-foundation-rs) | dependencies
| minor | `0.25` -> `0.26` |
| [cocoa](https://togithub.com/servo/core-foundation-rs) |
workspace.dependencies | minor | `0.25` -> `0.26` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-28 21:57:26 -07:00
ZZzzaaKK
6a5d0a5083
Reuse workspace on new journal entry command if possible (#16924)
Closes #6783

With this PR, the `journal: new journal entry` command only opens a new
workspace if the current workspace does not already contain the
`journal` directory. Both the root of the work tree and all its
subdirectories are checked.

This does not yet check for the day's file specifically, as suggested
[here](https://github.com/zed-industries/zed/issues/6783#issuecomment-2268509463).

I'm new to writing Rust code in production (as well as contributing in
general), so any feedback is much appreciated!

Release Notes:

- Reuse workspace on `journal: new journal entry` command if possible
2024-08-28 21:18:42 -07:00
Vitaly Slobodin
ca2eb275de
Unmount the auto-update disk image regardless of the auto-update status (#17019)
Closes #10782

In some cases, during the auto-update process,
the update can fail and leave a dangling disk image in macOS. If the
auto-update fails again, a new dangling mounted volume will be left
behind. To avoid polluting the system with these dangling mounted disk
images,
implement [the `Drop`
trait](https://doc.rust-lang.org/std/ops/trait.Drop.html) for the
`MacOSUnmounter` struct. This will ensure that the disk image
is unmounted when the `install_release_macos` function exits regardless
of its result.

## How to test this locally

Unfortunately, I was a bit too lazy to find a smarter way to test this,
so I simply commented out a bunch of lines to emulate the auto-update
process. To replicate the linked issue (#10782), you can apply the
attached patch. Build the Zed binary and run it. The auto-update should
fail, leaving the dangling mounted disk image in the system:

```shell
>diskutil list
/dev/disk5 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +220.6 MB   disk5
                                 Physical Store disk4s1
   1:                APFS Volume Zed                     190.6 MB   disk5s1
```

Run the Zed binary again to create another mounted disk image:

```shell
>diskutil list
/dev/disk5 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +220.6 MB   disk5
                                 Physical Store disk4s1
   1:                APFS Volume Zed                     190.6 MB   disk5s1

/dev/disk7 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +220.6 MB   disk7
                                 Physical Store disk6s1
   1:                APFS Volume Zed                     190.6 MB   disk7s1
```


[simulate_zed_autoupdate.patch](https://github.com/user-attachments/files/16787955/simulate_zed_autoupdate.patch)

Please let me know if the fix is good; otherwise, I am happy to
implement it differently. Thanks!

Release Notes:

- Fixed #10782
2024-08-28 21:15:38 -07:00
renovate[bot]
760e1a6db0
Update Rust crate sqlx to 0.8 [SECURITY] (#16791)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [sqlx](https://togithub.com/launchbadge/sqlx) | dev-dependencies |
minor | `0.7` -> `0.8` |
| [sqlx](https://togithub.com/launchbadge/sqlx) | dependencies | minor |
`0.7` -> `0.8` |

### GitHub Vulnerability Alerts

####
[GHSA-xmrp-424f-vfpx](https://togithub.com/launchbadge/sqlx/issues/3440)

The following presentation at this year's DEF CON was brought to our
attention on the SQLx Discord:

> SQL Injection isn't Dead: Smuggling Queries at the Protocol Level  
>
<http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf>
> (Archive link for posterity.)

Essentially, encoding a value larger than 4GiB can cause the length
prefix in the protocol to overflow,
causing the server to interpret the rest of the string as binary
protocol commands or other data.

It appears SQLx _does_ perform truncating casts in a way that could be
problematic,
for example:
<6f2905695b/sqlx-postgres/src/arguments.rs (L163)>

This code has existed essentially since the beginning, 
so it is reasonable to assume that all published versions `<= 0.8.0` are
affected.

## Mitigation

As always, you should make sure your application is validating
untrustworthy user input.
Reject any input over 4 GiB, or any input that could _encode_ to a
string longer than 4 GiB.
Dynamically built queries are also potentially problematic if it pushes
the message size over this 4 GiB bound.


[`Encode::size_hint()`](https://docs.rs/sqlx/latest/sqlx/trait.Encode.html#method.size_hint)
can be used for sanity checks, but do not assume that the size returned
is accurate.
For example, the `Json<T>` and `Text<T>` adapters have no reasonable way
to predict or estimate the final encoded size,
so they just return `size_of::<T>()` instead.

For web application backends, consider adding some middleware that
limits the size of request bodies by default.

## Resolution

Work has started on a branch to add `#[deny]` directives for the
following Clippy lints:

*
[`cast_possible_truncation`](https://rust-lang.github.io/rust-clippy/master/#/cast_possible_truncation)
*
[`cast_possible_wrap`](https://rust-lang.github.io/rust-clippy/master/#/cast_possible_wrap)
*
[`cast_sign_loss`](https://rust-lang.github.io/rust-clippy/master/#/cast_sign_loss)

and to manually audit the code that they flag.

A fix is expected to be included in the `0.8.1` release (still WIP as of
writing).

---

### Release Notes

<details>
<summary>launchbadge/sqlx (sqlx)</summary>

###
[`v0.8.1`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#081---2024-08-23)

[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.8.0...v0.8.1)

16 pull requests were merged this release cycle.

This release contains a fix for [RUSTSEC-2024-0363].

Postgres users are advised to upgrade ASAP as a possible exploit has
been demonstrated:
[#&#8203;3440
(comment)](https://togithub.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901)

MySQL and SQLite do not *appear* to be exploitable, but upgrading is
recommended nonetheless.

##### Added

- \[[#&#8203;3421]]: correct spelling of
`MySqlConnectOptions::no_engine_substitution()`
\[\[[@&#8203;kolinfluence](https://togithub.com/kolinfluence)]]
- Deprecates `MySqlConnectOptions::no_engine_subsitution()` (oops) in
favor of the correctly spelled version.

##### Changed

- \[[#&#8203;3376]]: doc: hide `spec_error` module
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- This is a helper module for the macros and was not meant to be
exposed.
- It is not expected to receive any breaking changes for the 0.8.x
release, but is not designed as a public API.
        Use at your own risk.
- \[[#&#8203;3382]]: feat: bumped to `libsqlite3-sys=0.30.1` to support
sqlite 3.46
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3385]]: chore(examples):Migrated the pg-chat example to
ratatui
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3399]]: Upgrade to rustls 0.23
\[\[[@&#8203;djc](https://togithub.com/djc)]]
- RusTLS now has pluggable cryptography providers: `ring` (the existing
implementation),
        and `aws-lc-rs` which has optional FIPS certification.
- The existing features activating RusTLS (`runtime-tokio-rustls`,
`runtime-async-std-rustls`, `tls-rustls`)
enable the `ring` provider of RusTLS to match the existing behavior so
this *should not* be a breaking change.
- Switch to the `tls-rustls-aws-lc-rs` feature to use the `aws-lc-rs`
provider.
- If using `runtime-tokio-rustls` or `runtime-async-std-rustls`,
this will necessitate switching to the appropriate non-legacy runtime
feature:
            `runtime-tokio` or `runtime-async-std`
- See the RusTLS README for more details:
<https://github.com/rustls/rustls?tab=readme-ov-file#cryptography-providers>

##### Fixed

- \[[#&#8203;2786]]: fix(sqlx-cli): do not clean sqlx during prepare
\[\[[@&#8203;cycraig](https://togithub.com/cycraig)]]
- \[[#&#8203;3354]]: sqlite: fix inconsistent read-after-write
\[\[[@&#8203;ckampfe](https://togithub.com/ckampfe)]]
- \[[#&#8203;3371]]: Fix encoding and decoding of MySQL enums in
`sqlx::Type` \[\[[@&#8203;alu](https://togithub.com/alu)]]
- \[[#&#8203;3374]]: fix: usage of `node12` in `SQLx` action
\[\[[@&#8203;hamirmahal](https://togithub.com/hamirmahal)]]
- \[[#&#8203;3380]]: chore: replace structopt with clap in examples
\[\[[@&#8203;tottoto](https://togithub.com/tottoto)]]
- \[[#&#8203;3381]]: Fix CI after Rust 1.80, remove dead feature
references \[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3384]]: chore(tests): fixed deprecation warnings
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3386]]: fix(dependencys):bumped cargo_metadata to `v0.18.1`
to avoid yanked `v0.14.3`
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3389]]: fix(cli): typo in error for required DB URL
\[\[[@&#8203;ods](https://togithub.com/ods)]]
- \[[#&#8203;3417]]: Update version to 0.8 in README
\[\[[@&#8203;soucosmo](https://togithub.com/soucosmo)]]
- \[[#&#8203;3441]]: fix: audit protocol handling
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- This addresses [RUSTSEC-2024-0363] and includes regression tests for
MySQL, Postgres and SQLite.

[#&#8203;2786]: https://togithub.com/launchbadge/sqlx/pull/2786

[#&#8203;3354]: https://togithub.com/launchbadge/sqlx/pull/3354

[#&#8203;3371]: https://togithub.com/launchbadge/sqlx/pull/3371

[#&#8203;3374]: https://togithub.com/launchbadge/sqlx/pull/3374

[#&#8203;3376]: https://togithub.com/launchbadge/sqlx/pull/3376

[#&#8203;3380]: https://togithub.com/launchbadge/sqlx/pull/3380

[#&#8203;3381]: https://togithub.com/launchbadge/sqlx/pull/3381

[#&#8203;3382]: https://togithub.com/launchbadge/sqlx/pull/3382

[#&#8203;3384]: https://togithub.com/launchbadge/sqlx/pull/3384

[#&#8203;3385]: https://togithub.com/launchbadge/sqlx/pull/3385

[#&#8203;3386]: https://togithub.com/launchbadge/sqlx/pull/3386

[#&#8203;3389]: https://togithub.com/launchbadge/sqlx/pull/3389

[#&#8203;3399]: https://togithub.com/launchbadge/sqlx/pull/3399

[#&#8203;3417]: https://togithub.com/launchbadge/sqlx/pull/3417

[#&#8203;3421]: https://togithub.com/launchbadge/sqlx/pull/3421

[#&#8203;3441]: https://togithub.com/launchbadge/sqlx/pull/3441

[RUSTSEC-2024-0363]:
https://rustsec.org/advisories/RUSTSEC-2024-0363.html

###
[`v0.8.0`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#080---2024-07-22)

[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.7.4...v0.8.0)

70 pull requests were merged this release cycle.

[#&#8203;2697] was merged the same day as release 0.7.4 and so was
missed by the automatic CHANGELOG generation.

##### Breaking

- \[[#&#8203;2697]]: fix(macros): only enable chrono when time is
disabled
\[\[[@&#8203;saiintbrisson](https://togithub.com/saiintbrisson)]]
- \[[#&#8203;2973]]: Generic Associated Types in Database, replacing
HasValueRef, HasArguments, HasStatement
\[\[[@&#8203;nitn3lav](https://togithub.com/nitn3lav)]]
- \[[#&#8203;2482]]: chore: bump syn to 2.0
\[\[[@&#8203;saiintbrisson](https://togithub.com/saiintbrisson)]]
- Deprecated type ascription syntax in the query macros was removed.
- \[[#&#8203;2736]]: Fix describe on PostgreSQL views with rules
\[\[[@&#8203;tsing](https://togithub.com/tsing)]]
- Potentially breaking: nullability inference changes for Postgres.
- \[[#&#8203;2869]]: Implement PgHasArrayType for all references
\[\[[@&#8203;tylerhawkes](https://togithub.com/tylerhawkes)]]
    -   Conflicts with existing manual implementations.
- \[[#&#8203;2940]]: fix: Decode and Encode derives
([#&#8203;1031](https://togithub.com/launchbadge/sqlx/issues/1031))
\[\[[@&#8203;benluelo](https://togithub.com/benluelo)]]
    -   Changes lifetime obligations for field types.
- \[[#&#8203;3064]]: Sqlite explain graph
\[\[[@&#8203;tyrelr](https://togithub.com/tyrelr)]]
    -   Potentially breaking: nullability inference changes for SQLite.
- \[[#&#8203;3123]]: Reorder attrs in sqlx::test macro
\[\[[@&#8203;bobozaur](https://togithub.com/bobozaur)]]
- Potentially breaking: attributes on `#[sqlx::test]` usages are applied
in the correct order now.
- \[[#&#8203;3126]]: Make Encode return a result
\[\[[@&#8203;FSMaxB](https://togithub.com/FSMaxB)]]
- \[[#&#8203;3130]]: Add version information for failed cli migration
([#&#8203;3129](https://togithub.com/launchbadge/sqlx/issues/3129))
\[\[[@&#8203;FlakM](https://togithub.com/FlakM)]]
    -   Breaking changes to `MigrateError`.
- \[[#&#8203;3181]]: feat: no tx migration
\[\[[@&#8203;cleverjam](https://togithub.com/cleverjam)]]
- (Postgres only) migrations that should not run in a transaction can be
flagged by adding `-- no-transaction` to the beginning.
    -   Breaking change: added field to `Migration`
- \[[#&#8203;3184]]: \[BREAKING} fix(sqlite): always use `i64` as
intermediate when decoding
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- integer decoding will now loudly error on overflow instead of silently
truncating.
- some usages of the query!() macros might change an i32 to an i64.
- \[[#&#8203;3252]]: fix `#[derive(sqlx::Type)]` in Postgres
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- Manual implementations of PgHasArrayType for enums will conflict with
the generated one. Delete the manual impl or add `#[sqlx(no_pg_array)]`
where conflicts occur.
    -   Type equality for PgTypeInfo is now schema-aware.
- \[[#&#8203;3329]]: fix: correct handling of arrays of custom types in
Postgres \[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- Potential breaking change: `PgTypeInfo::with_name()` infers types that
start with `_` to be arrays of the un-prefixed type. Wrap type names in
quotes to bypass this behavior.
- \[[#&#8203;3356]]: breaking: fix name collision in `FromRow`, return
`Error::ColumnDecode` for `TryFrom` errors
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- Breaking behavior change: errors with `#[sqlx(try_from = "T")]` now
return `Error::ColumnDecode` instead of `Error::ColumnNotFound`.
- Breaking because `#[sqlx(default)]` on an individual field or the
struct itself would have previously suppressed the error.
This doesn't seem like good behavior as it could result in some
potentially very difficult bugs.
- Instead, create a wrapper implementing `From` and apply the default
explicitly.
- \[[#&#8203;3337]]: allow rename with rename_all (close
[#&#8203;2896](https://togithub.com/launchbadge/sqlx/issues/2896))
\[\[[@&#8203;DirectorX](https://togithub.com/DirectorX)]]
- Changes the precedence of `#[sqlx(rename)]` and `#[sqlx(rename_all)]`
to match the expected behavior (`rename` wins).
- \[[#&#8203;3285]]: fix: use correct names for sslmode options
\[\[[@&#8203;lily-mosquitoes](https://togithub.com/lily-mosquitoes)]]
- Changes the output of `ConnectOptions::to_url_lossy()` to match what
parsing expects.

##### Added

- \[[#&#8203;2917]]: Add Debug impl for PgRow
\[\[[@&#8203;g-bartoszek](https://togithub.com/g-bartoszek)]]
- \[[#&#8203;3113]]: feat: new derive feature flag
\[\[[@&#8203;saiintbrisson](https://togithub.com/saiintbrisson)]]
- \[[#&#8203;3154]]: feat: add `MySqlTime`, audit `mysql::types` for
panics \[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3188]]: feat(cube): support postgres cube
\[\[[@&#8203;jayy-lmao](https://togithub.com/jayy-lmao)]]
- \[[#&#8203;3244]]: feat: support `NonZero*` scalar types
\[\[[@&#8203;AlphaKeks](https://togithub.com/AlphaKeks)]]
- \[[#&#8203;3260]]: feat: Add set_update_hook on SqliteConnection
\[\[[@&#8203;gridbox](https://togithub.com/gridbox)]]
- \[[#&#8203;3291]]: feat: support the Postgres Bool type for the Any
driver \[\[[@&#8203;etorreborre](https://togithub.com/etorreborre)]]
- \[[#&#8203;3293]]: Add LICENSE-\* files to crates
\[\[[@&#8203;LecrisUT](https://togithub.com/LecrisUT)]]
- \[[#&#8203;3303]]: add array support for NonZeroI\* in postgres
\[\[[@&#8203;JohannesIBK](https://togithub.com/JohannesIBK)]]
- \[[#&#8203;3311]]: Add example on how to use Transaction as Executor
\[\[[@&#8203;Lachstec](https://togithub.com/Lachstec)]]
- \[[#&#8203;3343]]: Add support for PostgreSQL HSTORE data type
\[\[[@&#8203;KobusEllis](https://togithub.com/KobusEllis)]]

##### Changed

- \[[#&#8203;2652]]: MySQL: Remove collation compatibility check for
strings \[\[[@&#8203;alu](https://togithub.com/alu)]]
- \[[#&#8203;2960]]: Removed `Send` trait bound from argument binding
\[\[[@&#8203;bobozaur](https://togithub.com/bobozaur)]]
- \[[#&#8203;2970]]: refactor: lift type mappings into driver crates
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3148]]: Bump libsqlite3-sys to v0.28
\[\[[@&#8203;NfNitLoop](https://togithub.com/NfNitLoop)]]
- Note: version bumps to `libsqlite3-sys` are not considered breaking
changes as per our semver guarantees.
- \[[#&#8203;3265]]: perf: box `MySqlConnection` to reduce sizes of
futures
\[\[[@&#8203;stepantubanov](https://togithub.com/stepantubanov)]]
- \[[#&#8203;3352]]: chore:added a testcase for `sqlx migrate add ...`
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3340]]: ci: Add job to check that sqlx builds with its
declared minimum dependencies
\[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]

##### Fixed

- \[[#&#8203;2702]]: Constrain cyclic associated types to themselves
\[\[[@&#8203;BadBastion](https://togithub.com/BadBastion)]]
- \[[#&#8203;2954]]: Fix several inter doc links
\[\[[@&#8203;ralpha](https://togithub.com/ralpha)]]
- \[[#&#8203;3073]]: feat(logging): Log slow acquires from connection
pool \[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3137]]: SqliteConnectOptions::filename() memory fix
([#&#8203;3136](https://togithub.com/launchbadge/sqlx/issues/3136))
\[\[[@&#8203;hoxxep](https://togithub.com/hoxxep)]]
- \[[#&#8203;3138]]: PostgreSQL Bugfix: Ensure connection is usable
after failed COPY inside a transaction
\[\[[@&#8203;feikesteenbergen](https://togithub.com/feikesteenbergen)]]
- \[[#&#8203;3146]]: fix(sqlite): delete unused `ConnectionHandleRaw`
type \[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3162]]: Drop urlencoding dependency
\[\[[@&#8203;paolobarbolini](https://togithub.com/paolobarbolini)]]
- \[[#&#8203;3165]]: Bump deps that do not need code changes
\[\[[@&#8203;GnomedDev](https://togithub.com/GnomedDev)]]
- \[[#&#8203;3167]]: fix(ci): use `docker compose` instead of
`docker-compose`
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3172]]: fix: Option decoding in any driver
\[\[[@&#8203;pxp9](https://togithub.com/pxp9)]]
- \[[#&#8203;3173]]: fix(postgres) : int type conversion while decoding
\[\[[@&#8203;RaghavRox](https://togithub.com/RaghavRox)]]
- \[[#&#8203;3190]]: Update time to 0.3.36
\[\[[@&#8203;BlackSoulHub](https://togithub.com/BlackSoulHub)]]
- \[[#&#8203;3191]]: Fix unclean TLS shutdown
\[\[[@&#8203;levkk](https://togithub.com/levkk)]]
- \[[#&#8203;3194]]: Fix leaking connections in fetch_optional
([#&#8203;2647](https://togithub.com/launchbadge/sqlx/issues/2647))
\[\[[@&#8203;danjpgriffin](https://togithub.com/danjpgriffin)]]
- \[[#&#8203;3216]]: security: bump rustls to 0.21.11
\[\[[@&#8203;toxeus](https://togithub.com/toxeus)]]
- \[[#&#8203;3230]]: fix: sqlite pragma order for auto_vacuum
\[\[[@&#8203;jasonish](https://togithub.com/jasonish)]]
- \[[#&#8203;3233]]: fix: get_filename should not consume self
\[\[[@&#8203;jasonish](https://togithub.com/jasonish)]]
- \[[#&#8203;3234]]: fix(ci): pin Rust version, ditch unmaintained
actions \[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3236]]: fix: resolve `path` ownership problems when using
`sqlx_macros_unstable`
\[\[[@&#8203;lily-mosquitoes](https://togithub.com/lily-mosquitoes)]]
- \[[#&#8203;3254]]: fix: hide `sqlx_postgres::any`
\[\[[@&#8203;Zarathustra2](https://togithub.com/Zarathustra2)]]
- \[[#&#8203;3266]]: ci: MariaDB - add back 11.4 and add 11.5
\[\[[@&#8203;grooverdan](https://togithub.com/grooverdan)]]
- \[[#&#8203;3267]]: ci: syntax fix
\[\[[@&#8203;grooverdan](https://togithub.com/grooverdan)]]
- \[[#&#8203;3271]]: docs(sqlite): fix typo - unixtime() -> unixepoch()
\[\[[@&#8203;joelkoen](https://togithub.com/joelkoen)]]
- \[[#&#8203;3276]]: Invert boolean for `migrate` error message.
([#&#8203;3275](https://togithub.com/launchbadge/sqlx/issues/3275))
\[\[[@&#8203;nk9](https://togithub.com/nk9)]]
- \[[#&#8203;3279]]: fix Clippy errors
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3288]]: fix: sqlite update_hook char types
\[\[[@&#8203;jasonish](https://togithub.com/jasonish)]]
- \[[#&#8203;3297]]: Pass the `persistent` query setting when preparing
queries with the `Any` driver
\[\[[@&#8203;etorreborre](https://togithub.com/etorreborre)]]
- \[[#&#8203;3298]]: Track null arguments in order to provide the
appropriate type when converting them.
\[\[[@&#8203;etorreborre](https://togithub.com/etorreborre)]]
- \[[#&#8203;3312]]: doc: Minor rust docs fixes
\[\[[@&#8203;SrGesus](https://togithub.com/SrGesus)]]
- \[[#&#8203;3327]]: chore: fixed one usage of `select_input_type!()`
being unhygenic
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3328]]: fix(ci): comment not separated from other
characters \[\[[@&#8203;hamirmahal](https://togithub.com/hamirmahal)]]
- \[[#&#8203;3341]]: refactor: Resolve cargo check warnings in postgres
examples \[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3346]]: fix(postgres): don't panic if `M` or `C` Notice
fields are not UTF-8
\[\[[@&#8203;YgorSouza](https://togithub.com/YgorSouza)]]
- \[[#&#8203;3350]]: fix:the `json`-feature should activate
`sqlx-postgres?/json` as well
\[\[[@&#8203;CommanderStorm](https://togithub.com/CommanderStorm)]]
- \[[#&#8203;3353]]: fix: build script new line at eof
\[\[[@&#8203;Zarthus](https://togithub.com/Zarthus)]]
- (no PR): activate `clock` and `std` features of
`workspace.dependencies.chrono`.

[#&#8203;2482]: https://togithub.com/launchbadge/sqlx/pull/2482

[#&#8203;2652]: https://togithub.com/launchbadge/sqlx/pull/2652

[#&#8203;2697]: https://togithub.com/launchbadge/sqlx/pull/2697

[#&#8203;2702]: https://togithub.com/launchbadge/sqlx/pull/2702

[#&#8203;2736]: https://togithub.com/launchbadge/sqlx/pull/2736

[#&#8203;2869]: https://togithub.com/launchbadge/sqlx/pull/2869

[#&#8203;2917]: https://togithub.com/launchbadge/sqlx/pull/2917

[#&#8203;2940]: https://togithub.com/launchbadge/sqlx/pull/2940

[#&#8203;2954]: https://togithub.com/launchbadge/sqlx/pull/2954

[#&#8203;2960]: https://togithub.com/launchbadge/sqlx/pull/2960

[#&#8203;2970]: https://togithub.com/launchbadge/sqlx/pull/2970

[#&#8203;2973]: https://togithub.com/launchbadge/sqlx/pull/2973

[#&#8203;3064]: https://togithub.com/launchbadge/sqlx/pull/3064

[#&#8203;3073]: https://togithub.com/launchbadge/sqlx/pull/3073

[#&#8203;3113]: https://togithub.com/launchbadge/sqlx/pull/3113

[#&#8203;3123]: https://togithub.com/launchbadge/sqlx/pull/3123

[#&#8203;3126]: https://togithub.com/launchbadge/sqlx/pull/3126

[#&#8203;3130]: https://togithub.com/launchbadge/sqlx/pull/3130

[#&#8203;3137]: https://togithub.com/launchbadge/sqlx/pull/3137

[#&#8203;3138]: https://togithub.com/launchbadge/sqlx/pull/3138

[#&#8203;3146]: https://togithub.com/launchbadge/sqlx/pull/3146

[#&#8203;3148]: https://togithub.com/launchbadge/sqlx/pull/3148

[#&#8203;3154]: https://togithub.com/launchbadge/sqlx/pull/3154

[#&#8203;3162]: https://togithub.com/launchbadge/sqlx/pull/3162

[#&#8203;3165]: https://togithub.com/launchbadge/sqlx/pull/3165

[#&#8203;3167]: https://togithub.com/launchbadge/sqlx/pull/3167

[#&#8203;3172]: https://togithub.com/launchbadge/sqlx/pull/3172

[#&#8203;3173]: https://togithub.com/launchbadge/sqlx/pull/3173

[#&#8203;3181]: https://togithub.com/launchbadge/sqlx/pull/3181

[#&#8203;3184]: https://togithub.com/launchbadge/sqlx/pull/3184

[#&#8203;3188]: https://togithub.com/launchbadge/sqlx/pull/3188

[#&#8203;3190]: https://togithub.com/launchbadge/sqlx/pull/3190

[#&#8203;3191]: https://togithub.com/launchbadge/sqlx/pull/3191

[#&#8203;3194]: https://togithub.com/launchbadge/sqlx/pull/3194

[#&#8203;3216]: https://togithub.com/launchbadge/sqlx/pull/3216

[#&#8203;3230]: https://togithub.com/launchbadge/sqlx/pull/3230

[#&#8203;3233]: https://togithub.com/launchbadge/sqlx/pull/3233

[#&#8203;3234]: https://togithub.com/launchbadge/sqlx/pull/3234

[#&#8203;3236]: https://togithub.com/launchbadge/sqlx/pull/3236

[#&#8203;3244]: https://togithub.com/launchbadge/sqlx/pull/3244

[#&#8203;3252]: https://togithub.com/launchbadge/sqlx/pull/3252

[#&#8203;3254]: https://togithub.com/launchbadge/sqlx/pull/3254

[#&#8203;3260]: https://togithub.com/launchbadge/sqlx/pull/3260

[#&#8203;3265]: https://togithub.com/launchbadge/sqlx/pull/3265

[#&#8203;3266]: https://togithub.com/launchbadge/sqlx/pull/3266

[#&#8203;3267]: https://togithub.com/launchbadge/sqlx/pull/3267

[#&#8203;3271]: https://togithub.com/launchbadge/sqlx/pull/3271

[#&#8203;3276]: https://togithub.com/launchbadge/sqlx/pull/3276

[#&#8203;3279]: https://togithub.com/launchbadge/sqlx/pull/3279

[#&#8203;3285]: https://togithub.com/launchbadge/sqlx/pull/3285

[#&#8203;3288]: https://togithub.com/launchbadge/sqlx/pull/3288

[#&#8203;3291]: https://togithub.com/launchbadge/sqlx/pull/3291

[#&#8203;3293]: https://togithub.com/launchbadge/sqlx/pull/3293

[#&#8203;3297]: https://togithub.com/launchbadge/sqlx/pull/3297

[#&#8203;3298]: https://togithub.com/launchbadge/sqlx/pull/3298

[#&#8203;3303]: https://togithub.com/launchbadge/sqlx/pull/3303

[#&#8203;3311]: https://togithub.com/launchbadge/sqlx/pull/3311

[#&#8203;3312]: https://togithub.com/launchbadge/sqlx/pull/3312

[#&#8203;3327]: https://togithub.com/launchbadge/sqlx/pull/3327

[#&#8203;3328]: https://togithub.com/launchbadge/sqlx/pull/3328

[#&#8203;3329]: https://togithub.com/launchbadge/sqlx/pull/3329

[#&#8203;3337]: https://togithub.com/launchbadge/sqlx/pull/3337

[#&#8203;3340]: https://togithub.com/launchbadge/sqlx/pull/3340

[#&#8203;3341]: https://togithub.com/launchbadge/sqlx/pull/3341

[#&#8203;3343]: https://togithub.com/launchbadge/sqlx/pull/3343

[#&#8203;3346]: https://togithub.com/launchbadge/sqlx/pull/3346

[#&#8203;3350]: https://togithub.com/launchbadge/sqlx/pull/3350

[#&#8203;3352]: https://togithub.com/launchbadge/sqlx/pull/3352

[#&#8203;3353]: https://togithub.com/launchbadge/sqlx/pull/3353

[#&#8203;3356]: https://togithub.com/launchbadge/sqlx/pull/3356

###
[`v0.7.4`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#074---2024-03-11)

[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.7.3...v0.7.4)

38 pull requests were merged this release cycle.

This is officially the **last** release of the 0.7.x release cycle.

As of this release, development of 0.8.0 has begun on `main` and only
high-priority bugfixes may be backported.

##### Added

- \[[#&#8203;2891]]: feat: expose getters for connect options fields
\[\[[@&#8203;saiintbrisson](https://togithub.com/saiintbrisson)]]
- \[[#&#8203;2902]]: feat: add `to_url_lossy` to connect options
\[\[[@&#8203;lily-mosquitoes](https://togithub.com/lily-mosquitoes)]]
- \[[#&#8203;2927]]: Support `query!` for cargo-free systems
\[\[[@&#8203;kshramt](https://togithub.com/kshramt)]]
- \[[#&#8203;2997]]: doc(FAQ): add entry explaining prepared statements
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3001]]: Update README to clarify MariaDB support
\[\[[@&#8203;iangilfillan](https://togithub.com/iangilfillan)]]
- \[[#&#8203;3004]]: feat(logging): Add numeric elapsed time field
elapsed_secs \[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3007]]: feat: add `raw_sql` API
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- This hopefully makes it easier to find how to execute statements which
are not supported by the default
        prepared statement interfaces `query*()` and `query!()`.
- Improved documentation across the board for the `query*()` functions.
- Deprecated: `execute_many()` and `fetch_many()` on interfaces that use
prepared statements.
- Multiple SQL statements in one query string were only supported by
SQLite because its prepared statement
interface is the *only* way to execute SQL. All other database flavors
forbid multiple statements in
one prepared statement string as an extra defense against SQL injection.
- The new `raw_sql` API retains this functionality because it explicitly
does *not* use prepared statements.
Raw or text-mode query interfaces generally allow multiple statements in
one query string, and this is
supported by all current databases. Due to their nature, however, one
cannot use bind parameters with them.
- If this change affects you, an issue is open for discussion:
[https://github.com/launchbadge/sqlx/issues/3108](https://togithub.com/launchbadge/sqlx/issues/3108)
- \[[#&#8203;3011]]: Added support to IpAddr with MySQL/MariaDB.
\[\[[@&#8203;Icerath](https://togithub.com/Icerath)]]
- \[[#&#8203;3013]]: Add default implementation for PgInterval
\[\[[@&#8203;pawurb](https://togithub.com/pawurb)]]
- \[[#&#8203;3018]]: Add default implementation for PgMoney
\[\[[@&#8203;pawurb](https://togithub.com/pawurb)]]
- \[[#&#8203;3026]]: Update docs to reflect support for MariaDB data
types \[\[[@&#8203;iangilfillan](https://togithub.com/iangilfillan)]]
- \[[#&#8203;3037]]: feat(mysql): allow to connect with mysql driver
without default behavor
\[\[[@&#8203;darkecho731](https://togithub.com/darkecho731)]]

##### Changed

- \[[#&#8203;2900]]: Show latest url to docs for macro.migrate
\[\[[@&#8203;Vrajs16](https://togithub.com/Vrajs16)]]
- \[[#&#8203;2914]]: Use `create_new` instead of `atomic-file-write`
\[\[[@&#8203;mattfbacon](https://togithub.com/mattfbacon)]]
- \[[#&#8203;2926]]: docs: update example for `PgConnectOptions`
\[\[[@&#8203;Fyko](https://togithub.com/Fyko)]]
- \[[#&#8203;2989]]: sqlx-core: Remove dotenvy dependency
\[\[[@&#8203;joshtriplett](https://togithub.com/joshtriplett)]]
- \[[#&#8203;2996]]: chore: Update ahash to 0.8.7
\[\[[@&#8203;takenoko-gohan](https://togithub.com/takenoko-gohan)]]
- \[[#&#8203;3006]]: chore(deps): Replace unmaintained tempdir crate
with tempfile \[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3008]]: chore: Ignore .sqlx folder created by running ci
steps locally \[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3009]]: chore(dev-deps): Upgrade env_logger from 0.9 to
0.11 \[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3010]]: chore(deps): Upgrade criterion to 0.5.1
\[\[[@&#8203;iamjpotts](https://togithub.com/iamjpotts)]]
- \[[#&#8203;3050]]: Optimize SASL auth in sqlx-postgres
\[\[[@&#8203;mirek26](https://togithub.com/mirek26)]]
- \[[#&#8203;3055]]: Set TCP_NODELAY option on TCP sockets
\[\[[@&#8203;mirek26](https://togithub.com/mirek26)]]
- \[[#&#8203;3065]]: Improve max_lifetime handling
\[\[[@&#8203;mirek26](https://togithub.com/mirek26)]]
- \[[#&#8203;3072]]: Change the name of "inner" function generated by
`#[sqlx::test]` \[\[[@&#8203;ciffelia](https://togithub.com/ciffelia)]]
- \[[#&#8203;3083]]: Remove sha1 because it's not being used in postgres
\[\[[@&#8203;rafaelGuerreiro](https://togithub.com/rafaelGuerreiro)]]

##### Fixed

- \[[#&#8203;2898]]: Fixed docs
\[\[[@&#8203;Vrajs16](https://togithub.com/Vrajs16)]]
- \[[#&#8203;2905]]: fix(mysql): Close prepared statement if persistence
is disabled
\[\[[@&#8203;larsschumacher](https://togithub.com/larsschumacher)]]
- \[[#&#8203;2913]]: Fix handling of deferred constraints
\[\[[@&#8203;Thomasdezeeuw](https://togithub.com/Thomasdezeeuw)]]
- \[[#&#8203;2919]]: fix duplicate "\`" in FromRow "default" attribute
doc comment \[\[[@&#8203;shengsheng](https://togithub.com/shengsheng)]]
- \[[#&#8203;2932]]: fix(postgres): avoid unnecessary flush in
PgCopyIn::read_from \[\[[@&#8203;tsing](https://togithub.com/tsing)]]
- \[[#&#8203;2955]]: Minor fixes
\[\[[@&#8203;Dawsoncodes](https://togithub.com/Dawsoncodes)]]
- \[[#&#8203;2963]]: Fixed ReadMe badge styling
\[\[[@&#8203;tadghh](https://togithub.com/tadghh)]]
- \[[#&#8203;2976]]: fix: AnyRow not support PgType::Varchar
\[\[[@&#8203;holicc](https://togithub.com/holicc)]]
- \[[#&#8203;3053]]: fix: do not panic when binding a large BigDecimal
\[\[[@&#8203;Ekleog](https://togithub.com/Ekleog)]]
- \[[#&#8203;3056]]: fix: spans in sqlite tracing
([#&#8203;2876](https://togithub.com/launchbadge/sqlx/issues/2876))
\[\[[@&#8203;zoomiti](https://togithub.com/zoomiti)]]
- \[[#&#8203;3089]]: fix(migrate): improve error message when parsing
version from filename
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;3098]]: Migrations fixes
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
    -   Unhides `sqlx::migrate::Migrator`.
- Improves I/O error message when failing to read a file in
`migrate!()`.

[#&#8203;2891]: https://togithub.com/launchbadge/sqlx/pull/2891

[#&#8203;2898]: https://togithub.com/launchbadge/sqlx/pull/2898

[#&#8203;2900]: https://togithub.com/launchbadge/sqlx/pull/2900

[#&#8203;2902]: https://togithub.com/launchbadge/sqlx/pull/2902

[#&#8203;2905]: https://togithub.com/launchbadge/sqlx/pull/2905

[#&#8203;2913]: https://togithub.com/launchbadge/sqlx/pull/2913

[#&#8203;2914]: https://togithub.com/launchbadge/sqlx/pull/2914

[#&#8203;2919]: https://togithub.com/launchbadge/sqlx/pull/2919

[#&#8203;2926]: https://togithub.com/launchbadge/sqlx/pull/2926

[#&#8203;2927]: https://togithub.com/launchbadge/sqlx/pull/2927

[#&#8203;2932]: https://togithub.com/launchbadge/sqlx/pull/2932

[#&#8203;2955]: https://togithub.com/launchbadge/sqlx/pull/2955

[#&#8203;2963]: https://togithub.com/launchbadge/sqlx/pull/2963

[#&#8203;2976]: https://togithub.com/launchbadge/sqlx/pull/2976

[#&#8203;2989]: https://togithub.com/launchbadge/sqlx/pull/2989

[#&#8203;2996]: https://togithub.com/launchbadge/sqlx/pull/2996

[#&#8203;2997]: https://togithub.com/launchbadge/sqlx/pull/2997

[#&#8203;3001]: https://togithub.com/launchbadge/sqlx/pull/3001

[#&#8203;3004]: https://togithub.com/launchbadge/sqlx/pull/3004

[#&#8203;3006]: https://togithub.com/launchbadge/sqlx/pull/3006

[#&#8203;3007]: https://togithub.com/launchbadge/sqlx/pull/3007

[#&#8203;3008]: https://togithub.com/launchbadge/sqlx/pull/3008

[#&#8203;3009]: https://togithub.com/launchbadge/sqlx/pull/3009

[#&#8203;3010]: https://togithub.com/launchbadge/sqlx/pull/3010

[#&#8203;3011]: https://togithub.com/launchbadge/sqlx/pull/3011

[#&#8203;3013]: https://togithub.com/launchbadge/sqlx/pull/3013

[#&#8203;3018]: https://togithub.com/launchbadge/sqlx/pull/3018

[#&#8203;3026]: https://togithub.com/launchbadge/sqlx/pull/3026

[#&#8203;3037]: https://togithub.com/launchbadge/sqlx/pull/3037

[#&#8203;3050]: https://togithub.com/launchbadge/sqlx/pull/3050

[#&#8203;3053]: https://togithub.com/launchbadge/sqlx/pull/3053

[#&#8203;3055]: https://togithub.com/launchbadge/sqlx/pull/3055

[#&#8203;3056]: https://togithub.com/launchbadge/sqlx/pull/3056

[#&#8203;3065]: https://togithub.com/launchbadge/sqlx/pull/3065

[#&#8203;3072]: https://togithub.com/launchbadge/sqlx/pull/3072

[#&#8203;3083]: https://togithub.com/launchbadge/sqlx/pull/3083

[#&#8203;3089]: https://togithub.com/launchbadge/sqlx/pull/3089

[#&#8203;3098]: https://togithub.com/launchbadge/sqlx/pull/3098

###
[`v0.7.3`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#073---2023-11-22)

38 pull requests were merged this release cycle.

##### Added

- \[[#&#8203;2478]]: feat(citext): support postgres citext
\[\[[@&#8203;hgranthorner](https://togithub.com/hgranthorner)]]
- \[[#&#8203;2545]]: Add `fixtures_path` in sqlx::test args
\[\[[@&#8203;ripa1995](https://togithub.com/ripa1995)]]
- \[[#&#8203;2665]]: feat(mysql): support packet splitting
\[\[[@&#8203;tk2217](https://togithub.com/tk2217)]]
- \[[#&#8203;2752]]: Enhancement
[#&#8203;2747](https://togithub.com/launchbadge/sqlx/issues/2747)
Provide `fn PgConnectOptions::get_host(&self)`
\[\[[@&#8203;boris-lok](https://togithub.com/boris-lok)]]
- \[[#&#8203;2769]]: Customize the macro error message based on the
metadata \[\[[@&#8203;Nemo157](https://togithub.com/Nemo157)]]
- \[[#&#8203;2793]]: derived Hash trait for PgInterval
\[\[[@&#8203;yasamoka](https://togithub.com/yasamoka)]]
- \[[#&#8203;2801]]: derive FromRow: sqlx(default) for all fields
\[\[[@&#8203;grgi](https://togithub.com/grgi)]]
- \[[#&#8203;2827]]: Add impl `FromRow` for the unit type
\[\[[@&#8203;nanoqsh](https://togithub.com/nanoqsh)]]
- \[[#&#8203;2871]]: Add `MySqlConnectOptions::get_database()`
\[\[[@&#8203;shiftrightonce](https://togithub.com/shiftrightonce)]]
- \[[#&#8203;2873]]: Sqlx Cli: Added force flag to drop database for
postgres \[\[[@&#8203;Vrajs16](https://togithub.com/Vrajs16)]]
- \[[#&#8203;2894]]: feat: `Text` adapter
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]

##### Changed

- \[[#&#8203;2701]]: Remove documentation on offline feature
\[\[[@&#8203;Baptistemontan](https://togithub.com/Baptistemontan)]]
- \[[#&#8203;2713]]: Add additional info regarding using Transaction and
PoolConnection as…
\[\[[@&#8203;satwanjyu](https://togithub.com/satwanjyu)]]
- \[[#&#8203;2770]]: Update README.md
\[\[[@&#8203;snspinn](https://togithub.com/snspinn)]]
- \[[#&#8203;2797]]: doc(mysql): document behavior regarding `BOOLEAN`
and the query macros
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;2803]]: Don't use separate temp dir for query jsons (2)
\[\[[@&#8203;mattfbacon](https://togithub.com/mattfbacon)]]
- \[[#&#8203;2819]]: postgres begin cancel safe
\[\[[@&#8203;conradludgate](https://togithub.com/conradludgate)]]
- \[[#&#8203;2832]]: Update extra_float_digits default to 2 instead of 3
\[\[[@&#8203;brianheineman](https://togithub.com/brianheineman)]]
- \[[#&#8203;2865]]: Update Faq - Bulk upsert with optional fields
\[\[[@&#8203;Vrajs16](https://togithub.com/Vrajs16)]]
- \[[#&#8203;2880]]: feat: use specific message for slow query logs
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;2882]]: Do not require db url for prepare
\[\[[@&#8203;tamasfe](https://togithub.com/tamasfe)]]
- \[[#&#8203;2890]]: doc(sqlite): cover lack of `NUMERIC` support
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
-   \[No PR]: Upgraded `libsqlite3-sys` to 0.27.0
    -   Note: linkage to `libsqlite3-sys` is considered semver-exempt;
        see the release notes for 0.7.0 below for details.

##### Fixed

- \[[#&#8203;2640]]: fix: sqlx::macro db cleanup race condition by
adding a margin to current timestamp
\[\[[@&#8203;fhsgoncalves](https://togithub.com/fhsgoncalves)]]
- \[[#&#8203;2655]]: \[fix] Urlencode when passing filenames to sqlite3
\[\[[@&#8203;uttarayan21](https://togithub.com/uttarayan21)]]
- \[[#&#8203;2684]]: Make PgListener recover from UnexpectedEof
\[\[[@&#8203;hamiltop](https://togithub.com/hamiltop)]]
- \[[#&#8203;2688]]: fix: Make rust_decimal and bigdecimal decoding more
lenient \[\[[@&#8203;cameronbraid](https://togithub.com/cameronbraid)]]
- \[[#&#8203;2754]]: Is tests/x.py maintained? And I tried fix it.
\[\[[@&#8203;qwerty2501](https://togithub.com/qwerty2501)]]
- \[[#&#8203;2784]]: fix: decode postgres time without subsecond
\[\[[@&#8203;granddaifuku](https://togithub.com/granddaifuku)]]
- \[[#&#8203;2806]]: Depend on version of async-std with non-private
spawn-blocking \[\[[@&#8203;A248](https://togithub.com/A248)]]
- \[[#&#8203;2820]]: fix: correct decoding of `rust_decimal::Decimal`
for high-precision values
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;2822]]: issue
[#&#8203;2821](https://togithub.com/launchbadge/sqlx/issues/2821) Update
error handling logic when opening a TCP connection
\[\[[@&#8203;anupj](https://togithub.com/anupj)]]
- \[[#&#8203;2826]]: chore: bump some sqlx-core dependencies
\[\[[@&#8203;djc](https://togithub.com/djc)]]
- \[[#&#8203;2838]]: Fixes rust_decimal scale for Postgres
\[\[[@&#8203;jkleinknox](https://togithub.com/jkleinknox)]]
- \[[#&#8203;2847]]: Fix comment in `sqlx migrate add` help text
\[\[[@&#8203;cryeprecision](https://togithub.com/cryeprecision)]]
- \[[#&#8203;2850]]: fix(core): avoid unncessary wakeups in
`try_stream!()`
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;2856]]: Prevent warnings running `cargo build`
\[\[[@&#8203;nyurik](https://togithub.com/nyurik)]]
- \[[#&#8203;2864]]: fix(sqlite): use `AtomicUsize` for thread IDs
\[\[[@&#8203;abonander](https://togithub.com/abonander)]]
- \[[#&#8203;2892]]: Fixed force dropping bug
\[\[[@&#8203;Vrajs16](https://togithub.com/Vrajs16)]]

[#&#8203;2478]: https://togithub.com/launchbadge/sqlx/pull/2478

[#&#8203;2545]: https://togithub.com/launchbadge/sqlx/pull/2545

[#&#8203;2640]: https://togithub.com/launchbadge/sqlx/pull/2640

[#&#8203;2655]: https://togithub.com/launchbadge/sqlx/pull/2655

[#&#8203;2665]: https://togithub.com/launchbadge/sqlx/pull/2665

[#&#8203;2684]: https://togithub.com/launchbadge/sqlx/pull/2684

[#&#8203;2688]: https://togithub.com/launchbadge/sqlx/pull/2688

[#&#8203;2701]: https://togithub.com/launchbadge/sqlx/pull/2701

[#&#8203;2713]: https://togithub.com/launchbadge/sqlx/pull/2713

[#&#8203;2752]: https://togithub.com/launchbadge/sqlx/pull/2752

[#&#8203;2754]: https://togithub.com/launchbadge/sqlx/pull/2754

[#&#8203;2769]: https://togithub.com/launchbadge/sqlx/pull/2769

[#&#8203;2770]: https://togithub.com/launchbadge/sqlx/pull/2770

[#&#8203;2782]: https://togithub.com/launchbadge/sqlx/pull/2782

[#&#8203;2784]: https://togithub.com/launchbadge/sqlx/pull/2784

[#&#8203;2793]: https://togithub.com/launchbadge/sqlx/pull/2793

[#&#8203;2797]: https://togithub.com/launchbadge/sqlx/pull/2797

[#&#8203;2801]: https://togithub.com/launchbadge/sqlx/pull/2801

[#&#8203;2803]: https://togithub.com/launchbadge/sqlx/pull/2803

[#&#8203;2806]: https://togithub.com/launchbadge/sqlx/pull/2806

[#&#8203;2819]: https://togithub.com/launchbadge/sqlx/pull/2819

[#&#8203;2820]: https://togithub.com/launchbadge/sqlx/pull/2820

[#&#8203;2822]: https://togithub.com/launchbadge/sqlx/pull/2822

[#&#8203;2826]: https://togithub.com/launchbadge/sqlx/pull/2826

[#&#8203;2827]: https://togithub.com/launchbadge/sqlx/pull/2827

[#&#8203;2832]: https://togithub.com/launchbadge/sqlx/pull/2832

[#&#8203;2838]: https://togithub.com/launchbadge/sqlx/pull/2838

[#&#8203;2847]: https://togithub.com/launchbadge/sqlx/pull/2847

[#&#8203;2850]: https://togithub.com/launchbadge/sqlx/pull/2850

[#&#8203;2856]: https://togithub.com/launchbadge/sqlx/pull/2856

[#&#8203;2864]: https://togithub.com/launchbadge/sqlx/pull/2864

[#&#8203;2865]: https://togithub.com/launchbadge/sqlx/pull/2865

[#&#8203;2871]: https://togithub.com/launchbadge/sqlx/pull/2871

[#&#8203;2873]: https://togithub.com/launchbadge/sqlx/pull/2873

[#&#8203;2880]: https://togithub.com/launchbadge/sqlx/pull/2880

[#&#8203;2882]: https://togithub.com/launchbadge/sqlx/pull/2882

[#&#8203;2890]: https://togithub.com/launchbadge/sqlx/pull/2890

[#&#8203;2892]: https://togithub.com/launchbadge/sqlx/pull/2892

[#&#8203;2894]: https://togithub.com/launchbadge/sqlx/pull/2894

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" in timezone America/New_York,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-28 21:08:15 -07:00
CharlesChen0823
400e503d9b
project_search: Add ability to search only for opened files (#16580)
Any suggestion?

Release Notes:
  - add ability for project search only for opend files.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-28 21:41:29 -06:00
张小白
403fdd6018
windows: Fix autohide taskbar dosen't automatically appear when Zed is maximized (#16806)
Closes #12313

This PR introduces the following improvements:
1. Fixed the issue where the auto-hide taskbar wouldn't automatically
appear when Zed is maximized.
2. Refactored the `WM_NCCALCSIZE` code, making it more human-readable.

Release Notes:

- Fixed auto-hide taskbar would refuse to show itself when `Zed` is
maximized on
Winodws([#12313](https://github.com/zed-industries/zed/issues/12313)).

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-08-28 20:36:28 -07:00
0x2CA
77c6243aa8
vim: Fix Smart Relative Line Number (#17052)
when the focused_vim is deactivate, focused_vim should set none.

fix the problem that opening the first buffer from EmptyPane will not
toggle,The reason is the edge case where focused_vim is none when
opening for the first time.

Release Notes:

- N/A
2024-08-28 21:31:51 -06:00
Valaphee The Meerkat
65b934e6f1
linux: Remove inode/directory from supported MIME types (#16940)
At the moment Zed is handled as default file browser which causes
applications like RustRover to open Zed when instead it should open the
Gnome files app. And Zed is probably not intended to be an replacement
to the Gnome files app for example.

I'm also currently waiting to fix the issue that Zed is not displayed as
an "Application" when using "Open with..." on Arch Linux. Which is
caused by not setting `APP_ARGS` which should have the value `%F`

Release Notes:

- Fixed: Zed will no longer be handled as default file browser
2024-08-28 20:16:52 -07:00
apricotbucket28
a68a543d43
linux: Prompt library fixes (#16850)
This PR fixes two issues:
1. The prompt library window didn't set an `app_id` on Linux, which
caused it to be missing the Zed logo
2. A dangling reference to the window in the Wayland client code, which
caused the prompt library window not to close. See:
https://github.com/zed-industries/zed/pull/13201

Release Notes:

- Linux: Fixed the prompt library not closing on Wayland

---------

Co-authored-by: Junkui Zhang <364772080@qq.com>
2024-08-28 20:11:01 -07:00
张小白
9ad845b40a
windows: Implement theme changed events (#16207)
Closes [#16198](https://github.com/zed-industries/zed/issues/16198)

AFAIK, when the system's theme mode or accent color changes, there are
typically two types of broadcast messages:

1. A `WM_SETTINGCHANGE` message, where `lParam` points to the string
"ImmersiveColorSet".
2. A `WM_DWMCOLORIZATIONCOLORCHANGED` message.

I use `WM_DWMCOLORIZATIONCOLORCHANGED` here for simplicity.


https://github.com/user-attachments/assets/422f8e4e-c698-4e7c-8d2d-01f453b9a7b3


Release Notes:

- N/A
2024-08-28 20:05:19 -07:00
张小白
598d62de04
windows: Fix popup window when using external command (#15547)
Thanks techs-sus on Discord.


Co-authored-by: shenjack <3695888@qq.com>
Co-authored-by: techs-sus <discord>


Release Notes:

- N/A

Co-authored-by: shenjack <3695888@qq.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-08-28 19:58:50 -07:00
Fernando Tagawa
8e8927db4b
linux: Fix IME panel position while enumerating input methods (#12495)
Release Notes:

- N/A

This updates the IME position every time the selection changes, this is
probably only useful when you enumerate languages with your IME.

TODO:
- ~There is a rare chance that the ime panel is not updated because the
window input handler is None.~
- ~Update IME panel in vim mode.~
- ~Update IME panel when leaving Buffer search input.~

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-08-28 19:58:40 -07:00
张小白
e6d5f4406f
windows: Fix path parsing issue when launching Zed from command line (#15856)
Closes #15826
Closes #16068

When launching zed from the command line, the path parsing prefixes with
`\\?\`. Some LSP servers do not support this type of path, so here I
just simply remove the prefix.

Release Notes:

- N/A
2024-08-28 19:52:18 -07:00
张小白
aec8fb7e37
windows: Refactor prompt_for_paths and prompt_for_new_path (#15774)
Refactored `prompt_for_paths` and `prompt_for_new_path`, now errors can
propagate properly.

Release Notes:

- N/A
2024-08-28 19:51:39 -07:00
Arkadi Shishlov
a2d41b1f89
Hint to allow software rasterizer (#15560)
Depending on a number of CPU cores llvmpipe could provide adequate
performance.

A little bit of help to skip searching Zed codebase for solution.

Release Notes:

- N/A
2024-08-28 19:41:24 -07:00
张小白
462808e5b0
windows: Fix extensions couldn't start if the path contained spaces (#15489)
Closes #15441 .

Fixed the issue where extensions couldn't start if the path contained
spaces. Additionally, this PR introduces the `node_environment_path`
function to obtain the PATH environment variable which includes the node
path.

Release Notes:

- N/A
2024-08-28 19:32:15 -07:00
张小白
e8dfc30314
windows: Fix IME window position on Win10 (#15471)
On Windows, different input methods use different APIs to set their
window positions:
- The Japanese input method on Windows 11 uses `ImmSetCandidateWindow`.
- The Chinese input method on Windows 10 uses `ImmSetCompositionWindow`.
- The Chinese input method on Windows 11 can use either.

Therefore, this PR calls both functions to cover the various scenarios.

Additionally, introduced a helper function `with_input_handler` to
improve code readability.

Release Notes:

- N/A
2024-08-28 19:29:53 -07:00
张小白
3c53832141
windows: Implement single instance (#15371)
This PR implements a single instance mechanism using the `CreateEventW`
function to create a mutex. If the identifier name begins with `Local`,
the single instance applies only to processes under the same user. If
the identifier begins with `Global`, it applies to all users.

Additionally, I was thinking that perhaps we should integrate the single
instance functionality into `gpui`. I believe applications developed
using `gpui` would benefit from this feature. Furthermore, incorporating
the single instance implementation into `gpui` would facilitate the
`set_dock_menu` functionality. As I mentioned in #12068, the
implementation of `set_dock_menu` on Windows depends on the single
instance feature. When a user clicks the "dock menu", Windows will open
a new application instance. To achieve behavior similar to macOS, we
need to prevent the new instance from launching and instead pass the
parameters to the existing instance.

Any advice and suggestions are welcome.




https://github.com/user-attachments/assets/c46f7e92-4411-4fa9-830e-383798a9dd93



Release Notes:

- N/A
2024-08-28 19:26:24 -07:00
Marshall Bowers
b374c7d912
Fix casing of "macOS" (#17040)
This PR fixes a number of spots in English contexts (docs, comments,
etc.) where we were using "MacOS" instead of "macOS".

Release Notes:

- N/A
2024-08-28 19:10:49 -04:00
renovate[bot]
0b6dc3e6c2
Update Rust crate cbindgen to 0.27.0 (#17033)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [cbindgen](https://togithub.com/mozilla/cbindgen) | build-dependencies
| minor | `0.26.0` -> `0.27.0` |

---

### Release Notes

<details>
<summary>mozilla/cbindgen (cbindgen)</summary>

###
[`v0.27.0`](https://togithub.com/mozilla/cbindgen/blob/HEAD/CHANGES#0270)

[Compare
Source](https://togithub.com/mozilla/cbindgen/compare/0.26.0...v0.27.0)

-   Revert: The `Config` struct now has a private member.
\* Allow users to specify a crate version for bindings generation
([#&#8203;901](https://togithub.com/mozilla/cbindgen/issues/901)).
\* Update MSRV to 1.74
([#&#8203;912](https://togithub.com/mozilla/cbindgen/issues/912),
[#&#8203;987](https://togithub.com/mozilla/cbindgen/issues/987)).
\* Support #\[deprecated] on enum variants
([#&#8203;933](https://togithub.com/mozilla/cbindgen/issues/933)).
\* Support integrating the package_version information in a header file
comment
([#&#8203;939](https://togithub.com/mozilla/cbindgen/issues/939)).
\* Add a language backend
([#&#8203;942](https://togithub.com/mozilla/cbindgen/issues/942)).
\* Support generics with defaulted args
([#&#8203;959](https://togithub.com/mozilla/cbindgen/issues/959)).
\* Add `VaList` compatibility
([#&#8203;970](https://togithub.com/mozilla/cbindgen/issues/970)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 18:41:04 -04:00
Piotr Osiewicz
dfd113dfb0
pane: Fix tooltips of navigation buttons (#17035)
Tooltips for "Go Forward"/"Go Back" did not show the keybindings. Now
they do.

Release Notes:

- N/A
2024-08-29 00:28:00 +02:00
Evren Sen
9ca772991f
Add git awareness to file tab icons (#16637)
Before:
<img width="536" alt="Screenshot 2024-08-22 at 15 58 22"
src="https://github.com/user-attachments/assets/7d957f82-cb09-451e-b944-28d57220a718">

After:
<img width="542" alt="Screenshot 2024-08-22 at 15 58 32"
src="https://github.com/user-attachments/assets/fc203c90-903a-4c35-8af0-45cca66cb9d6">


Release Notes:

- N/A

---------

Co-authored-by: evrensen467 <146845123+evrensen467@users.noreply.github.com>
2024-08-29 01:21:20 +03:00
Conrad Irwin
f19d0f0b98
Fix OpenPathPrompt locally with tilde (#17027)
Release Notes:

- Fixed a panic opening a file in ~/ with `use_system_prompts: false`
2024-08-28 14:42:00 -06:00
Conrad Irwin
9beb4d4380
Move shared_buffers into BufferStore (#17020)
This also updates the SSH protocol (but not yet collab) to more closely
track which buffers are open on the client.

Release Notes:

- N/A
2024-08-28 14:41:41 -06:00
CharlesChen0823
0853cb573f
file_finder: Fix crash in new_path_prompt (#16991)
Closes #16919 

repro step:
  - add two worktree
  - modify settings `"use_system_path_prompts" : false`
  - `ctrl-n` create new file, typing any chars.
  - `ctrl-s` save file
  - typing any char, crashed.

Release Notes:

- Fixed crashed when setting `"use_system_path_prompts": false` or in
remote project with two or more worktree.
2024-08-28 14:28:09 -06:00
Marshall Bowers
c988ff8ed7
Put zed: open account settings action behind a feature flag (#17014)
This PR puts the `zed: open account settings` action behind the
`zed-pro` feature flag, as it isn't supposed to be visible to users yet.

Closes https://github.com/zed-industries/zed/issues/17010.

Release Notes:

- N/A
2024-08-28 12:53:35 -04:00
Joseph T Lyons
324964d23a v0.152.x dev 2024-08-28 11:43:51 -04:00
Kirill Bulatov
c5f43ee81c
Forbid signature popovers when completion menu is open (#17009)
Closes https://github.com/zed-industries/zed/issues/16748

Release Notes:

- Fixed signature info popovers appearing when completion menu is open
2024-08-28 18:25:07 +03:00
Kirill Bulatov
98d74f9317
Use a proper settings location for yaml (#17006)
Release Notes:

- N/A

Co-authored-by: Marshall Bowers <marshall@zed.dev>
2024-08-28 18:00:38 +03:00
Marshall Bowers
950e698834
extensions_ui: Truncate long text with an ellipsis (#17007)
This PR updates the extensions UI to truncate long text with an
ellipsis.

| Before | After |
|
--------------------------------------------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------------------------------------------
|
| <img width="538" alt="Screenshot 2024-08-28 at 10 25 29 AM"
src="https://github.com/user-attachments/assets/98fda7b9-aac0-4c1b-903b-0d72070a166b">
| <img width="538" alt="Screenshot 2024-08-28 at 10 21 42 AM"
src="https://github.com/user-attachments/assets/948b1e66-3822-4c52-8483-522c28f393c7">
|

Release Notes:

- Improved the truncation of long author lists and descriptions in the
extensions view.
2024-08-28 10:47:43 -04:00
Marshall Bowers
ace8734b63
Revert "extension: Define capabilities in the extension manifest (#16953)" (#17003)
This PR reverts the addition of extension capabilities from #16953.

While these may end up being useful at some point, after some discussion
they don't seem like the exact fit for what we're looking to do right
now.

This reverts commit 8ec36f1e2b.

Release Notes:

- N/A
2024-08-28 09:30:13 -04:00
Thorsten Ball
4e67d33d88
project search: Fix filtering when buffers are open (#16997)
This fixes a little bug that has snuck in #16923

Release Notes:

- N/A
2024-08-28 13:39:53 +02:00
CharlesChen0823
a5b82b2bf3
project_panel: Add support for copy/paste between different worktrees (#15396)
Closes https://github.com/zed-industries/zed/issues/5362

Release Notes:

- Added a way to copy/cut-paste between different worktrees ([#5362](https://github.com/zed-industries/zed/issues/5362))
2024-08-28 11:35:18 +03:00
Piotr Osiewicz
4ec1f29df0
chore: Make some of the deps of gpui optional (#16986)
Minor bookkeeping, that takes down dep count of gpui from 454 to 430 for
me.

Release Notes:

- N/A
2024-08-28 10:05:50 +02:00
Conrad Irwin
22a791d9c7
Bump collab min version to 0.134 (#16918)
0.05% of requests use a version less than this today; and it lets us get
  rid of a bunch of versioning we no longer need.

Release Notes:

- N/A
2024-08-27 21:44:00 -06:00
fletcher gornick
cfc3b7de05
vim: Retain search direction upon search submit (#16754)
Before, when using `?` and `#` for backwards search it would initially
search for the previous match, but upon subsequent inputs to `n` and
`N`, `n` is always treated as "forward" and `N` is always treated as
"backward", instead of continuing the search direction.

now, if i use `?` or `#` for backward search, `n` will go to the
previous selection, and `N` will go to the next. Functionality stays the
same for `/` and `*`.

Release Notes:

- vim: Fixed `n` direction after searching backwards

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-27 18:50:19 -06:00
Conrad Irwin
bef575e30a
Simplify project syncing (#16976)
As part of allowing LSPs to run remotely, we need to move LSP stuff
out of project. To do that we'd like to simplify the concurrency story
on project syncing.

Co-Authored-By: Max <max@zed.dev>

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-08-27 15:36:38 -06:00
Conrad Irwin
8643b11f57
Fix search sorting (#16970)
Ensures we sort paths in search the same as we do in panels.

Ideally we'd store things like this in the worktree, but the sort order
depends
on file vs directory, and callers generally don't know which they're
asking for.

Release Notes:

- N/A
2024-08-27 13:46:36 -06:00
Kyle Kelley
442ff94d58
Further document repl outputs (#16962)
Adding more docs to the repl outputs modules.

Release Notes:

- N/A
2024-08-27 12:34:16 -07:00
dovakin0007
f633b125b9
Fix git commit popup message bracket (#16279) 2024-08-27 15:18:48 -04:00
Thorsten Ball
1d868e19f2
project search: Render results in batches (#16960)
This improves performance, because we don't render after every single
match/range that was added to the results.

I think for my example search it's twice as fast?

## Numbers

Recorded in debug mode (because it's 6:30pm and my poor computer has
spun its fan enough for today and also because you can see the change of
the effect more in debug mode), rendering `<` searched in `zed.dev`
repo:

- Before: `14.59558225s`
- After: `2.604320875s`




## Videos
Before (recorded in release mode):



https://github.com/user-attachments/assets/909260fa-3e69-49ab-8786-dd384e2a27ee

After (recorded in release mode):



https://github.com/user-attachments/assets/fc8a85d3-e575-470f-b59c-16a6df8b3f80
## Release Notes

Release Notes:

- Improved performance of rendering project-search results in the
multi-buffer after finding them.
2024-08-27 18:37:26 +02:00
Conrad Irwin
b2f3f760ab
project search: Stream search results to improve TTFB (#16923)
This is a prototype change to improve latency of local project searches.
It refactors the matcher to keep paths "in-order" so that we don't need
to wait for all matching files to display the first result.

On a test (searching for `<` in zed.dev) it changes the time until first
result from about 2s to about 50ms. The tail latency seems to increase
slightly (from 5s to 7s) so we may want to do more tuning before hitting
merge.

Release Notes:

- reduces latency for first project search result

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
2024-08-27 09:37:07 -06:00
Marshall Bowers
8ec36f1e2b
extension: Define capabilities in the extension manifest (#16953)
This PR adds an initial notion of extension capabilities.

Capabilities are used to express the operations an extension is capable
of doing. This will provide further insights into what an extension can
do, as well as provide the ability to grant or deny the set of
capabilities.

Capabilities are defined in the `capabilities` field in the extension
manifest. This field contains an array of capabilities.

Each capability has a `kind` to denote the known capability it
corresponds to. Individual capabilities may have additional fields,
based on the `kind`.

Here's an example of some capabilities:

```toml
capabilities = [
    { kind = "download-file", host = "github.com", path_prefix = "owner/repo" },
    { kind = "npm:install", package = "@vue/language-server" },
]
```

In order to avoid a breaking change, the `capabilities` field is
currently optional and defaults to an empty array. This will allow us to
add support for extensions to define capabilities before we start
enforcing them.

Release Notes:

- N/A
2024-08-27 11:10:58 -04:00
Thorsten Ball
ad43bbbf5e
inline completions: Add action to toggle inline completions (#16947)
This adds a new action: `editor: toggle inline completions`.

It allows users to toggle inline completions on/off for the current
buffer.

That toggling is not persistent and when the editor is closed, it's
gone.

That makes it easy to disable inline completions for a single text
buffer, for example, even if you want them on for other buffers.

When toggling on/off, the toggling also overwrites any language
settings. So if you have inline completions disabled for Go buffers,
toggling them on takes precedence over those settings.


Release Notes:

- Added a new editor action to allow toggling inline completions
(Copilot, Supermaven) on and off for the current buffer, taking
precedence over any settings.

Co-authored-by: Antonio <antonio@zed.dev>
2024-08-27 15:51:57 +02:00
kshokhin
5586397f95
Preserve selected entry in file_finder (#13452)
Closes #11737

If the query has not changed and entry is still in the matches list keep
it selected


Release Notes:

- Fixes file finder jumping during background updates ([#11737](https://github.com/zed-industries/zed/issues/11737))
2024-08-27 16:24:06 +03:00
张小白
60af9dd4b1
Add .SystemUIFont to font list (#15340)
As discussed in #15326, this font name should be included in the font
list since `settings.json` indicates that one can set the font to
`.SystemUIFont`.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-27 09:23:24 -04:00
Peter Tripp
d3d0c043f5
Support extended keys on Mac (insert, f13-f19) (#16921)
- Improved support for extended keyboards on Mac (F13-F19, Insert)
2024-08-27 09:09:57 -04:00
Piotr Osiewicz
226ec9d404
gpui: Fix performance of app menu opening with large # of windows (#16939)
This is officially my weirdest performance fix to date; With large # of
windows opening app menu could take a lot of time (we're talking few
seconds with 9 windows, a minute with 10 windows). The fix is to make
one method pub(crate).. What?

<img width="981" alt="image"
src="https://github.com/user-attachments/assets/83b26154-0acd-43ef-84b3-4b85cde36120">

We were spending most of the time on clear_pending_keystrokes, which -
funnily enough - called itself recursively. It turned out we have two
methods; `AppContext::clear_pending_keystrokes` and
WindowContext::clear_pending_keystrokes. The former calls the latter,
but - due to the fact that `WindowContext::clear_pending_keystrokes` is
private and `WindowContext` derefs to `AppContext` - `AppContext` one
ended up actually calling itself! The fix is plain and simple - marking
WindowContext one as pub(crate), so that it gets picked up as a method
to call over `AppContext::clear_pending_keystrokes`.

Closes #16895



Release Notes:

- Fixed app menu performance slowdowns when there are multiple windows
open.
2024-08-27 12:23:00 +02:00
Thorsten Ball
8ec680cecb
project search: Increase perf up to 10x by batching git status calls (#16936)
***Update**: after rebasing on top of
https://github.com/zed-industries/zed/pull/16915/ (that also changed how
search worked), the results are still good, but not 10x. Instead of
going from 10s to 500ms, it goes from 10s to 3s.*

This improves the performance of project-wide search by an order of
magnitude.

After digging in, @as-cii and I found that opening buffers was the
bottleneck for project-wide search (since Zed opens, parses, ... buffers
when finding them, which is something VS Code doesn't do, for example).
So this PR improves the performance of opening multiple buffers at once.

It does this by doing two things:

- It batches scan-requests in the worktree. When we search, we search
files in chunks of 64. Previously we'd handle all 64 scan requests
separately. The new code checks if the scan requests can be batched and
if so it, it does that.
- It batches `git status` calls when reloading the project entries for
the opened buffers. Instead of calling `git status` for each file, it
calls `git status` for a batch of files, and then extracts the status
for each file.

(It has to be said that I think the slow performance on `main` has been
a regression introduced over the last few months with the changes made
to project/worktree/git. I don't think it was this slow ~5 months ago.
But I also don't think it was this fast ~5 months ago.)

## Benchmarks

| Search | Before | After (without
https://github.com/zed-industries/zed/pull/16915) | After (with
https://github.com/zed-industries/zed/pull/16915)
|--------|--------|-------|------|
| `zed.dev` at `2b2a501192e78e`, searching for `<` (`4484` results) |
3.0s<br>2.9s<br>2.89s | 489ms<br>517ms<br>476ms | n/a |
| `zed.dev` at `2b2a501192e78e`, searching for `:` (`25886+` results) |
3.9s<br>3.9s<br>3.8s | 70ms<br>66ms<br>72ms | n/a |
| `zed` at `55dda0e6af`, searching for `<` (`10937+` results) |
10s<br>11s<br>12s | 500m<br>499ms<br>543ms | 3.4s<br>3.1s<br> |

(All results recorded after doing a warm-up run that would start
language servers etc.)

Release Notes:

- Performance of project-wide search has been improved by up to 10x.

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-08-27 11:59:59 +02:00
Conrad Irwin
88d36d8b9f
Restore missing fifo check (#16931)
Fixes a merge conflict between #16915 and #16039

Release Notes:

- N/A
2024-08-26 21:17:44 -06:00
0x2CA
9662829810
vim: Add Smart Relative Line Number (#16567)
Closes #16514

Release Notes:

- Added Vim: absolute numbering in any mode except `insert` mode

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-26 21:17:21 -06:00
Kyle Kelley
26d943287b
REPL: Refactor output (#16927)
Shuffle `outputs.rs` into individual `outputs/*.rs` files and start
documenting them more.

Release Notes:

- N/A
2024-08-26 18:03:06 -07:00
Max Brunsfeld
bea6786f14
Fix git repository state corruption when work dir's metadata is updated (#16926)
Fixes https://github.com/zed-industries/zed/issues/13176

Release Notes:

- Fixed an issue where git state would stop updating if the root
directory of a git repository was updated in certain ways
2024-08-26 17:46:50 -07:00
moshyfawn
2de420a67b
assistant: Fix model selector check icon overflow (#16716)
Release Notes:

- Fixed assistant model selector check icon overflow for long model
names
2024-08-26 17:32:32 -07:00
Kirill Bulatov
f64f85eb1e
Do not hold any tasks by default and no other terminals (#16847) 2024-08-27 01:48:34 +03:00
apricotbucket28
29745ae229
blade: Align rasterized path bounds to whole pixels (#16784)
Related: https://github.com/zed-industries/zed/pull/15822

| Before | After |
| --- | --- |
|
![image](https://github.com/user-attachments/assets/4c4ed1e7-b639-44ce-b318-8cdaaee809ee)|
![image](https://github.com/user-attachments/assets/c2757528-eef3-4d21-9522-39b2597a96b7)
|
|
![image](https://github.com/user-attachments/assets/b70ee108-bea6-4e5e-9583-392d1163d236)
|
![image](https://github.com/user-attachments/assets/aefc1f0c-7bba-4287-a3f9-bbb9befb6a4c)
|

Release Notes:

- N/A
2024-08-27 01:26:59 +03:00
Stanislav Alekseev
6afb36fd6f
Reorganize the context menu a bit (#16773)
Follow up to #16080 
The idea is that the current context menu became a bit top-heavy over
time. Let's reorganisze it into four sections:
1. Finding symbols
2. Editing using lsp and similar
3. Copy/Cut/Paste
4. Getting file location

Release Notes:

- Reorganized context menu to be a bit less top heavy and have more
logical parts

Before (a giant part on top and two small ones on the bottom):
<img width="248" alt="Screenshot 2024-08-23 at 21 02 33"
src="https://github.com/user-attachments/assets/87a136c7-df16-4032-ba02-dea087fd8445">

After (much more balanced):
<img width="250" alt="Screenshot 2024-08-23 at 21 01 28"
src="https://github.com/user-attachments/assets/4aa48b8a-99f3-4315-b325-625a47ecd5b8">
2024-08-27 01:22:58 +03:00
Toni Cárdenas
b99bf92452
Implement "join pane into next" (#16077)
Closes #12409

Release Notes:

- Added "join pane into next" action ([#12409](https://github.com/zed-industries/zed/issues/12409))


https://github.com/zed-industries/zed/assets/727422/00cc8599-e5d6-4fb8-9f0d-9b232d2210ef

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-08-27 00:51:51 +03:00
Max Brunsfeld
f417893a7b
Avoid unwrap of Worktree::root_entry in resolve_path_in_worktrees (#16917)
It looks like this unwrap was introduced in
https://github.com/zed-industries/zed/pull/16534.

I think a worktree's `root_entry` can be null if it represents a
non-existent file that has not yet been saved. I hit a panic due to the
`unwrap` a couple of times on nightly.

Release Notes:

- N/A
2024-08-26 14:01:56 -07:00
Conrad Irwin
ef22372f0b
SSH remote search (#16915)
Co-Authored-By: Max <max@zed.dev>

Release Notes:

- ssh remoting: add project search

---------

Co-authored-by: Max <max@zed.dev>
2024-08-26 14:47:02 -06:00
Peter Tripp
0332eaf797
Remove reference to Copilot plugin (#16916) 2024-08-26 16:43:22 -04:00
Peter Tripp
c2835df898
Improve buffers used by Zed for discoverability/visibility (#16906)
- Fixed Telemetry log being marked dirty.
- Fixed asset buffers (default settings and default keymap) showing 'untitled' in breadcrumbs
2024-08-26 16:42:35 -04:00
Marshall Bowers
93a7682659
collab: Count active users based on the tokens per minute measure (#16911)
This PR fixes an issue where active user counts were being computed
across _all_ measures instead of the per-minute measures.

We now compute them using the tokens per minute measure, as we're
concerned with usage in recent minutes.

Release Notes:

- N/A
2024-08-26 15:04:55 -04:00
Scott Lembcke
e2635a685e
Add command to copy current file:line for working with external tools (#14793)
Closes #14787.

I made a quick draft implementation of this feature request:
https://github.com/zed-industries/zed/issues/14787

I know how to use use gdb well, so lacking a built-in debugger is OK.
BUT... Speaking personally, setting breakpoints is 50% of what I want an
IDE to do for me when debugging. Having a feature where I can click,
copy, "b [paste]", is a huge step up from typing the whole thing in
manually. I figure this must be useful for other external tools, or even
just regular-human-communication too.

Open Questions:
* Does this belong in the right click menu? (I put it next to "Copy
Permalink" which is similar.)
* Probably not useful enough to get a default keymap?
* Relative vs absolute path?
* Does this need tests?

Release Notes:

- Added `editor: copy file location` command to copy the current file
location (FILE:LINE) to the clipboard
([#14787](https://github.com/zed-industries/zed/issues/14787)).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-26 14:31:20 -04:00
TheCub3
2f08a0a28c
Fix fifo files hanging the project wide search (#16039)
Release Notes:

- Fixed the issue related to the project wide search being stuck when
project contains .fifo files
- Might potentially solve the following issue
https://github.com/zed-industries/zed/issues/7360
2024-08-26 10:40:20 -06:00
Piotr Osiewicz
aaddb73b28
assistant: Refesh message headers only for dirty messages (#16881)
We've noticed performance issues in long conversations with assistants;
the profiles pointed to slowiness in WrapMap (and indeed there were some
low hanging fruits that we picked up in
https://github.com/zed-industries/zed/pull/16761). That however did not
fully resolve the issue, as WrapMap still cracked through in profiles;
basically, the speedup I've landed has just moved the post elsewhere.

The higher level issue is that we were trying to refresh message headers
for all messages, irrespective of whether they've actually needed to be
updated. This PR fixes that by using `replace_blocks` API where
possible.

Release Notes:

- Improved performance of Assistant Panel with long conversations.
2024-08-26 18:16:23 +02:00
Thorsten Ball
afe4d8c8cc
yaml: Add single quotes to list of brackets (#16859)
Closes #16854

Release Notes:

- Single quotes are now auto-closable in YAML files
2024-08-26 18:02:40 +02:00
Nate Butler
7a964ff91a
Don't rely on relative path for docs preprocessor (#16883)
Reapplies #16700 with a corrected command. Now it no longer relies on a
relative path.

Thanks @maxdeviant for the quick help 🙏 

Release Notes:

- N/A
2024-08-26 11:43:13 -04:00
Berkus Decker
d67d44f600
extension: Add more logging when building extensions (#16794)
This helps debug what steps are taken and where
the compiled extension ended up.

Also remove duplicate "compiling Rust extension" / "compiling rust
extension" text - it's confusing.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-26 11:18:06 -04:00
Peter Tripp
7936fe40ae
ollama: Support model context_size (num_ctx) >2048 (#16877) 2024-08-26 11:09:47 -04:00
Nate Butler
2a03dde538
Revert "Add docs_preprocessor crate to support Zed Docs" (#16880)
Temporarily revert #16700 to deal with this error:

`error: manifest path `../crates/docs_preprocessor/Cargo.toml` does not
exist` as it was causing the docs-preprocessor not to run, meaning
unexpanded templates were showing up in the public docs.

Reverts zed-industries/zed#16700

Release Notes:

- N/A
2024-08-26 11:06:25 -04:00
Nate Butler
46bb04a019
Add docs_preprocessor crate to support Zed Docs (#16700)
This PR adds a mdbook preprocessor for supporting Zed's docs.

This initial version adds the following custom commands:

**Keybinding** 

`{#kb prefix::action_name}` (e.g. `{#kb zed::OpenSettings}`)

Outputs a keybinding template like `<kbd
class="keybinding">{macos_keybinding}|{linux_keybinding}</kbd>`. This
template is processed on the client side through `mdbook` to show the
correct keybinding for the user's platform.

**Action** 

`{#action prefix::action_name}` (e.g. `{#action zed::OpenSettings}`)

For now, simply outputs the action name in a readable manner. (e.g.
zed::OpenSettings -> zed: open settings)

In the future we'll add additional modes for this template, like create
a standard way to render `{action} ({keybinding})`.

## Example Usage

```
To open the assistant panel, toggle the right dock by using the {#action workspace::ToggleRightDock} action in the command palette or by using the
{#kb workspace::ToggleRightDock} shortcut.
```

Release Notes:

- N/A
2024-08-26 10:50:40 -04:00
张小白
5ee4c036f9
assistant: Normalize line endings for prompts loaded from templates (#16808)
Closes #16804

Similar to #15708, when reading prompts from a template, both Windows
and Linux might end up with `CRLF (\r\n)` line endings, which can result
in a panic.

Release Notes:

- N/A
2024-08-26 10:34:20 -04:00
apricotbucket28
a28700a74d
theme: Fallback to opaque color for title_bar.inactive_background (#16833)
Fixes https://github.com/zed-industries/zed/issues/16699, fixes
https://github.com/zed-industries/zed/issues/15112, fixes
https://github.com/zed-industries/zed/issues/14955

| Before | After |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/3c93dc02-3421-4fd8-b34e-c54644202caa)
|
![image](https://github.com/user-attachments/assets/f938d77f-7e9b-4c1f-9beb-38ff77a5fa93)
|

Release Notes:

- Linux: Fixed title bar becoming transparent when the window lost
focus.
2024-08-26 10:26:47 -04:00
Kirill Bulatov
55dda0e6af
A set of small fixes (#16849)
* Linux Clippy lints fixed
* Zed local tasks are now simpler to rerun
* Zed's `release-fast` build profile keeps the debug info so it's
possible to properly debug things without altering the sources

Release Notes:

- N/A
2024-08-26 02:24:08 +03:00
Kirill Bulatov
1a2a538366
Improve Linux terminal keymap and context menu (#16845)
Follow-up https://github.com/zed-industries/zed/pull/16085 that fixes
the search deploy to be actually a part of the terminal-related
bindings.

Part of https://github.com/zed-industries/zed/issues/16839

Also 

* fixes few other bindings to use `shift` and avoid conflicts with the
existing key bindings.
* adds terminal inline assist to the context menu and makes both the
menu and the button to dynamically adjust to `assist.enabled` settings
change

It is still unclear to me, why certain labels for certain bindings are
wrong (it's still showing `ctrl-w` for closing the terminal tab, and
`shift-insert` instead of `ctrl-shift-v` for Paste, while Insert is near
and has a `ctrl-shift-c` binding shown) but at least the keys work now.

Release notes: 
- Improved Linux terminal keymap and context menu
2024-08-26 01:01:46 +03:00
Kirill Bulatov
28271a9a36
Display buffer/project search entries in the outline panel (#16589)
Prototypes a way to display new entities in the outline panel, making it
less outline.
The design is not final and might be adjusted, but the workflow seems to
be solid enough to keep and iron it out.

* Now, when any project search buffer is activated (multi buffer mode),
or buffer search is open (singleton buffer mode, but is available for
search usages multi buffer too — in that case buffer search overrides
multi buffer's contents display), outline panel displays all search
matches instead of the outline items.

Outline items are not displayed at all during those cases, unless the
buffer search is closed, or a new buffer gets opened, of an active
buffer search matches zero items.


https://github.com/user-attachments/assets/4a3e4faa-7f75-4522-96bb-3761872c753a


* For the multi buffer mode, search matches are grouped under
directories and files, same as outline items

![Screenshot 2024-08-21 at 14 55
01](https://github.com/user-attachments/assets/6dac75e4-be4e-4338-917b-37a32c285b71)


* For buffer search , search matches are displayed one under another


![image](https://github.com/user-attachments/assets/9efcff85-d4c7-4462-9ef5-f76b08e59f20)


For both cases, the entire match line is taken and rendered, with the
hover tooltip showing the line number.
So far it does not look very bad, but I am certain there are bad cases
with long lines and bad indents where it looks not optimal — this part
most probably will be redesigned after some trial.
Or, maybe, it's ok to leave the current state if the horizontal
scrollbar is added?

Clicking the item navigates to the item's position in the editor.
Search item lines are also possible to filter with the outline panel's
filter input.

* Inline panel is now possible to "pin" to track a currently active
editor, to display outlines/search results for that editor even if
another item is activated afterwards:


![image](https://github.com/user-attachments/assets/75fb78c3-0e5f-47b4-ba3a-485c71d7e342)

This is useful in combination with project search results display: now
it's possible to leave the search results pinned in the outline panel
and jump to every search result and back.

If the item the panel was pinned to gets closed, the panel gets back to
its regular state, showing outlines/search results for a currently
active editor.


Release Notes:

- Added a way to display buffer/project search entries in the outline
panel
2024-08-25 21:40:02 +03:00
Piotr Osiewicz
5e55d5507f
language: Do not fetch diagnostics when iterating over text without language awareness (#16824)
This PR fixes a regression from
https://github.com/zed-industries/zed/pull/15646 where we've started
fetching diagnostic spans unconditionally (whereas previously that
wasn't done when iterating over raw text).

Closes #16764

Release Notes:

- Fixed performance regression in handling buffers with large quantities
of diagnostics.
2024-08-25 18:02:54 +02:00
Walter de Jong
14f8d3a33a
gpui: Send correct kill signal on Linux (#16797)
should be kill -0 (zero) instead

Related to #14291 and #14310

Release Notes:

- N/A
2024-08-24 22:11:06 +03:00
Marshall Bowers
340662e2f7
collab: Add lifetime spending limit for LLM usage (#16780)
This PR adds a lifetime spending limit on LLM usage.

Exceeding this limit will prevent further use of the Zed LLM provider.

Currently the cap is $1,000.

Release Notes:

- N/A
2024-08-23 16:41:16 -04:00
Affan Shahid
352c95cf0d
Add injections for GraphQL template literals and function calls (#16368)
This PR adds syntax highlighting support for `gql` and `graphql` tagged
literals. It also adds highlighting for `graphql()` and `gql()` function
calls, which are another common way to define queries.

Note: I am using the
[`graphql`](https://github.com/11bit/zed-extension-graphql) extension to
provide syntax highlighting

Before:
<img width="413" alt="image"
src="https://github.com/user-attachments/assets/114a98be-9790-4cdf-ba98-553f777ff08a">

After:
<img width="418" alt="image"
src="https://github.com/user-attachments/assets/98fc5dfd-d1a3-45c4-be8e-063cf68b6e6e">

Release Notes:

- Added syntax highlighting for `graphql` tagged template literals and
function calls in javascript, typescript and tsx languages.
2024-08-23 12:36:45 -06:00
Jason Lee
938d93a64c
gpui: Add truncate and text_ellipsis to TextStyle (#14850)
Release Notes:

- N/A

Ref issue #4996

## Demo

```
cargo run -p gpui --example text_wrapper 
```



https://github.com/user-attachments/assets/a7fcebf7-f287-4517-960d-76b12722a2d7

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 14:02:51 -04:00
Ihnat
12dda5fa1b
Add Format Buffer action to mouse context menu (#16080)
Closes #15891 

Release Notes:

- Added "Format Buffer" action to the right-click menu within a buffer.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 13:44:34 -04:00
Piotr Osiewicz
783cccf95d
WIP: Improve performance of Wrap Map (#16761)
We've ran into performance issues when reinserting new blocks into the
assistant panel; in profiles WrapMap showed up, as we try to query wrap
boundaries over and over, which is a hidden O(n^2) - for each block, we
may potentially look at all of the Wraps. This PR alleviates this issue
by storing away previously resolved wrap range; consecutive iterations
can often reuse it.
This should help with performance of Assistant Panel with long
conversations.

Release Notes:

- Improved performance of assistant panel with large # of text.
2024-08-23 18:59:30 +02:00
张小白
30a677e257
theme: Change autocomplete value for *_font_fallbacks (#16759)
This PR follows up #16466, changes the default value used when
autocompleting the `ui_font_fallbacks` and `ui_font_fallbacks` settings
from `null` to `[]`.

Special thanks to @maxdeviant for the guidance on writing better code!


Release Notes:

- N/A
2024-08-23 12:12:43 -04:00
Marshall Bowers
935cf542ae
Fix impersonation in local development (#16755)
This PR fixes impersonation in local development by fetching the user
from the GitHub API so we can get their `github_user_id`.

The `github_user_id` is now required after #16704.

Since this is just a development flow, we're fetching the user on the
client as opposed to making changes on the server.

This request uses the `GITHUB_TOKEN` environment variable for
authentication, if it exists, or will make an unauthenticated GitHub API
request.

Release Notes:

- N/A
2024-08-23 10:49:34 -04:00
Kevin Sweet
5e869dadf9
Fix ctrl-d/u issues with scroll_beyond_last_line off (#15395)
Closes #15356

Release Notes:

- vim: Fixed issues with `ctrl-d`/`ctrl-u` when
`scroll_beyond_last_line` is set to `off`
([#15356](https://github.com/zed-industries/zed/issues/15356)).


https://github.com/user-attachments/assets/d3166393-4a4e-4195-9db6-3ff1d4aeec78

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 08:34:40 -06:00
Piotr Osiewicz
518dd3ed3a
activity indicator: Do not show indicators background when there's no state (#16737)
Found by @SomeoneToIgnore :

![image](https://github.com/user-attachments/assets/3c8fd3f6-3411-4ca9-88b7-56a7d0d407d3)



Release Notes:

- N/A
2024-08-23 13:04:54 +02:00
Thorsten Ball
7647644602
zed ai: Show ToS form in Configuration View (#16736)
Related #16618

Release Notes:

- N/A
2024-08-23 11:17:21 +02:00
Piotr Osiewicz
119e337344
activity indicator: fix popover menu appearing for empty lists (#16734)
Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-08-23 12:02:07 +03:00
Liang Kui
82090c60ca
Able to resolve URLs with query params in terminal (#16724)
<img width="207" alt="image"
src="https://github.com/user-attachments/assets/aa7d8de1-313b-4aae-a6c6-00b442b76fb8">

Release Notes:

- URLs with query parameters are now clickable in the terminal
2024-08-23 10:58:53 +03:00
Florian Sanders
bdf26fe38a
Fix JavaScript and TypeScript HTML injections (#16479)
Fixes #16199

## Description

Recently added template string injections do not completely work for
because any time there is an interpolation (`${// some js content}`)
within an element, its closing tag is not highlighted properly:

![image](https://github.com/user-attachments/assets/e660894b-6e4b-4300-b8d9-2757fa235679)

This PR fixes the issue:

![image](https://github.com/user-attachments/assets/629a30c3-9b3a-4338-aee9-622dbb19581c)

Release Notes:

- Fixed incomplete syntax highlighting for HTML injections inside
JavaScript template tags.

## Note

I'm a beginner with treesitter so I only modified the part for HTML
usecase.
Should the same solution be applied to other injections (`css`, `js`,
etc.)?
2024-08-23 08:53:03 +02:00
Conrad Irwin
0fd5030297
Rename is_local to is_local_or_ssh (#16717)
Release Notes:

- N/A
2024-08-22 21:32:51 -06:00
狐狸
46ecd7d190
Fix typo in theme schema (#16711)
Release Notes:

- N/A
2024-08-22 22:36:00 -04:00
Nathan Sobo
88b03bc074
Allow file paths ending in a language-specific-extension to be used as the language name for injections (#12368)
This allows us to detect the language from the extension if we use paths
in fenced code blocks.

Release Notes:

- You can now use file paths ending in a language-specific file
extension at the start of markdown code blocks.
2024-08-22 19:02:49 -06:00
Marshall Bowers
db4ff7da6b
collab: Look up users using github_user_id when backfilling (#16708)
This PR updates the user backfiller to look up the GitHub users using
the `github_user_id` instead of `github_login`.

Release Notes:

- N/A
2024-08-22 19:58:04 -04:00
Conrad Irwin
fb35f15526
Fix linked ranges + multi-cursor (#16707)
Closes: #16695

Release Notes:

- Fixed double edits when a multi-cursor is in a linked editing range
2024-08-22 17:16:07 -06:00
Marshall Bowers
78120cc568
collab: Upsert users by github_user_id instead of github_login (#16706)
This PR makes it so users are upserted by their `github_user_id` instead
of by their `github_login`.

The `github_user_id` is a stable identifier that does not change, while
the `github_login` can change.

In practice we were already using
`get_or_create_user_by_github_account`, which already checks for an
existing user with a `github_user_id` first, so this change doesn't
result in a change in behavior.

This change is primarily for correctness in the event that `create_user`
is called directly, as we want to be upserting by the stable identifier.

Release Notes:

- N/A
2024-08-22 19:15:32 -04:00