Piotr Osiewicz
e6c1c51b37
chore: Fix several style lints ( #17488 )
...
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.
Release Notes:
- N/A
2024-09-06 11:58:39 +02:00
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
([#​2779](https://togithub.com/rust-lang/rust-bindgen/issues/2779 )).
- Add option to use DST structs for flexible arrays (--flexarray-dst,
[#​2772](https://togithub.com/rust-lang/rust-bindgen/issues/2772 )).
- Add option to dynamically load variables
([#​2812](https://togithub.com/rust-lang/rust-bindgen/issues/2812 )).
- Add option in CLI to use rustified non-exhaustive enums
(--rustified-non-exhaustive-enum,
[#​2847](https://togithub.com/rust-lang/rust-bindgen/issues/2847 )).
#### Changed
- Remove which and lazy-static dependencies
([#​2809](https://togithub.com/rust-lang/rust-bindgen/issues/2809 ),
[#​2817](https://togithub.com/rust-lang/rust-bindgen/issues/2817 )).
- Generate compile-time layout tests
([#​2787](https://togithub.com/rust-lang/rust-bindgen/issues/2787 )).
- Print `bindgen-cli` errors to stderr instead of stdout
([#​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`
([#​2789](https://togithub.com/rust-lang/rust-bindgen/issues/2789 ))
.
- Fix `--allowlist-item` so anonymous enums are no longer ignored
([#​2827](https://togithub.com/rust-lang/rust-bindgen/issues/2827 )).
- Use clang_getFileLocation instead of clang_getSpellingLocation to fix
clang-trunk
([#​2824](https://togithub.com/rust-lang/rust-bindgen/issues/2824 )).
- Fix generated constants: `f64::INFINITY`, `f64::NEG_ INFINITY`,
`f64::NAN`
([#​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.
([#​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
([#​2731](https://togithub.com/rust-lang/rust-bindgen/issues/2731 ))
- Stabilized thiscall_abi
([#​2661](https://togithub.com/rust-lang/rust-bindgen/issues/2661 ))
#### Changed
- Use CR consistently on windows
([#​2698](https://togithub.com/rust-lang/rust-bindgen/issues/2698 ))
- Replaced peeking_take_while by itertools
([#​2724](https://togithub.com/rust-lang/rust-bindgen/issues/2724 ))
#### Removed
#### Fixed
- Try to avoid repr(packed) for explicitly aligned types when not needed
([#​2734](https://togithub.com/rust-lang/rust-bindgen/issues/2734 ))
- Improved destructor handling on Windows
([#​2663](https://togithub.com/rust-lang/rust-bindgen/issues/2663 ))
- Support Float16
([#​2667](https://togithub.com/rust-lang/rust-bindgen/issues/2667 ))
- Fix alignment contribution from bitfields
([#​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
[#​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
([#​2543](https://togithub.com/rust-lang/rust-bindgen/issues/2543 ))
due to correctness regressions
[#​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
Piotr Osiewicz
33a67ad6b9
chore: Clippy fixes for 1.80 ( #13987 )
...
The biggest hurdle turned out to be use of `Arc<Language>` in maps, as
`clippy::mutable_key_type` started triggering on it (due to - I suppose
- internal mutability on `HighlightMap`?). I switched over to using
`LanguageId` as the key type in some of the callsites, as that's what
`Language` uses anyways for it's hash/eq, though I've still had to
suppress the lint outside of language crate.
/cc @maxdeviant , le clippy guru.
Release Notes:
- N/A
2024-07-10 17:53:17 +02:00
SELO
7be1ffb9ec
Add cross-compilation support from MacOS to Windows ( #13382 )
...
- Modify `build.rs` to use environment variables instead of `cfg`
directive to make cross-compilation to Windows possible
- Make `embed-resource` a global build-dependency for cross-compilation
Release Notes:
- N/A
2024-06-24 21:26:24 -06:00
Conrad Irwin
e5b88ac8c2
Use HIGH priority to wake blocked timers ( #11269 )
...
One contributor to some beach-balls was that the main thread was calling
block_with_timeout, but the timeout never fired.
Release Notes:
- Reduced main thread hangs under very high system load
2024-05-01 16:03:27 -06:00
张小白
268cb948a7
windows: Move manifest file to gpui
( #11036 )
...
This is a follow up of #10810 , `embed-resource` crate uses a different
method to link the manifest file, so this makes moving manifest file to
`gpui` possible.
Now, examples can run as expected:
![Screenshot 2024-04-26
111559](https://github.com/zed-industries/zed/assets/14981363/bb040690-8129-490b-83b3-0a7d3cbd4953 )
TODO:
- [ ] check if it builds with gnu toolchain
Release Notes:
- N/A
2024-04-26 13:56:48 -07:00
Niklas Wimmer
e2d6b0deba
gpui: Update dependencies (second attempt) ( #9836 )
...
Updated version of #9741 with fixes for the problems raised in #9774 . I
only verified that the images no longer look blueish on Linux, because I
don't have a Mac.
cc @osiewicz
Release Notes:
- N/A
---------
Signed-off-by: Niklas Wimmer <mail@nwimmer.me>
2024-03-28 10:22:31 -07:00
Piotr Osiewicz
a7047f67fb
chore: Revert "gpui: update dependencies" ( #9774 )
...
Reverts zed-industries/zed#9741
/cc @niklaswimmer it looks like that PR change broke our rendering of
avatars (as @bennetbo found out) - they have a blue-ish tint now, which
I suppose might have to do with change between BGRA and RGBA. I'm gonna
revert it for now, let's reopen it though.
![image](https://github.com/zed-industries/zed/assets/24362066/3078d9c6-9638-441b-8b32-d969c46951e0 )
Release Notes:
- N/A
2024-03-25 15:27:16 +01:00
Niklas Wimmer
97f1d61a4a
gpui: make build dependencies mac only
...
This removes bindgen and cbindgen from the dependency graph on non-macos
systems, improving compile times on those systems.
Signed-off-by: Niklas Wimmer <mail@nwimmer.me>
2024-03-25 13:03:57 +01:00
Mikayla Maki
fd0071f2af
Add an animation to the LSP checking indicator ( #9463 )
...
Spinner go spinny.
Extra thanks to @kvark for helping me with the shaders.
https://github.com/zed-industries/zed/assets/2280405/9d5f4f4e-0d43-44d2-a089-5d69939938e9
Release Notes:
- Added a spinning animation to the LSP checking indicator
---------
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2024-03-19 10:16:18 -07:00
Marshall Bowers
bf666af3a2
Deny all Clippy warnings ( #8720 )
...
This PR makes Clippy deny all warnings across the workspace.
We now enumerate all of the rules that have violations and temporarily
allow them, with the goal being to drive the list down over time.
On Windows we don't yet use `--deny warnings`, as the Windows build
still has some warnings.
Release Notes:
- N/A
2024-03-02 15:51:01 -05:00
Dzmitry Malyshau
9ad1862f2f
Enable Blade on MacOS via "macos-blade" feature ( #7669 )
...
Depends on https://github.com/zed-industries/font-kit/pull/2 and
https://github.com/kvark/blade/pull/77
This change enables Blade to be also used on MacOS. It will also make it
easier to use it on Windows.
What works: most of the things. Zed loads as fast and appears equally
responsive to the current renderer.
<img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM"
src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827 ">
Things missing:
- [x] video streaming. ~~Requires a bit of plumbing on both Blade and
Zed sides, but all fairly straightforward.~~
- verified with a local setup
- [x] resize. ~~Not sure where exactly to hook up the reaction on the
window size change. Once we know where, the fix is one line.~~
- [ ] fine-tune CA Layer
- this isn't a blocker for merging the PR, but it would be a blocker if
we wanted to switch to the new path by default
- [ ] rebase on latest, get the dependency merged (need review/merge of
https://github.com/zed-industries/font-kit/pull/2 !)
Update: I implemented resize support as well as "surface" rendering on
the Blade path (which will be useful on Linux/Windows later on). I
haven't tested the latter though - not sure how to get something
streaming. Would appreciate some help! I don't think this should be a
blocker to this PR, anyway.
The only little piece that's missing for the Blade on MacOS path to be
full-featured is fine-tuning the CALayer configuration. Zed does a lot
of careful logic in configuring the layer, such as switching the
"present with transaction" on/off intermittently, which Blade path
doesn't have yet.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-16 13:39:40 -08:00
Antonio Scandurra
67b96b2b40
Replace CADisplayLink
with CVDisplayLink
( #7583 )
...
Release Notes:
- Fixed a bug that caused Zed to render at 60fps even on ProMotion
displays.
- Fixed a bug that could saturate the main thread event loop in certain
circumstances.
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-02-08 13:47:12 -05:00
Mikayla
67555ee5b4
Merge branch 'main' into kvark-linux
2024-02-07 11:52:44 -08:00
Conrad Irwin
b59e110c59
Attempt to fix random lag ( #7506 )
...
Co-Authored-By: Antonio <antonio@zed.dev>
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>
Release Notes:
- N/A
**or**
- N/A
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-07 09:45:49 -07:00
Dzmitry Malyshau
cf71fe8bf1
fix MacOS build, switch external RWH to 0.6
...
leaving blade-internal RWH as 0.5 until this is fixed:
https://github.com/ash-rs/ash/issues/864
2024-02-03 23:50:44 -08:00
Dzmitry Malyshau
666b134d20
linux: shadow rendering
2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
d675abf70c
Add Linux platform, gate usage of CVImageBuffer by macOS
2024-02-01 21:28:16 -08:00
Dzmitry Malyshau
ef4ef5f0e8
Add blade dependency
2024-02-01 21:27:43 -08:00
Piotr Osiewicz
5941102aac
gpui: Add runtime-shaders feature so that Xcode.app is no longer necessary for Nix-based workflows ( #7148 )
...
Release Notes:
- N/A
Co-authored-by: Niklas <niklas@niklaskorz.de>
2024-01-31 17:37:16 +01:00
Piotr Osiewicz
f7b6bfefe6
chore: Remove rerun-if-changed clause that might cause spurious rebuilds ( #4193 )
...
Something is stomping over the timestamp of generated scene.h right
after the build script finishes:
`Dirty gpui v0.1.0 (/Users/someonetoignore/work/zed/zed/crates/gpui):
the file target/debug/build/gpui-ca04eedfe8d0e13c/out/scene.h has
changed (1705922004.637000680s, 1s after last build at
1705922003.507431315s)`
^ That's an output of `-v` flag added to either `cargo run` or `cargo
build`.
This comes up when you do `cargo build` followed by `cargo run` or
another `cargo build`; the artifact is not getting reused, even though
it should be possible?
Release Notes:
- N/A
2024-01-28 15:35:53 +01:00
Antonio Scandurra
0ff5603dc9
Rebuild shader header when cbindgen sources have changed
...
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-01-15 16:23:22 +01:00
Max Brunsfeld
f5ba22659b
Remove 2 suffix from gpui
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
f62d13de21
Use a hand-coded parser for keymap context predicates
2023-01-16 15:53:49 -08:00
Joseph Lyons
233b28a1b9
Appease clippy
2023-01-01 23:50:45 -05:00
Antonio Scandurra
de24b4b4e8
Bump minimum macOS version to 10.15.7
...
This solves an issue with loading Swift libraries when running the
x86_64 binary.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-20 18:01:41 +02:00
ForLoveOfCats
8ba2f77148
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Nathan Sobo
fdfed3d7db
Move all crates to a top-level crates folder
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:22:21 -06:00