Compare commits

...

8 Commits

Author SHA1 Message Date
Antonio Scandurra
d05a3c62ad Remove existing gzip files before compressing dSYMs (#7818)
This should fix the build.

Release Notes:

- N/A
2024-02-16 15:20:55 -08:00
Kirill Bulatov
cd13d353c9 zed 0.123.2 2024-02-16 23:36:45 +02:00
Max Brunsfeld
37298579b6 Don't support cloning the extensions view (#7875)
Fixes https://github.com/zed-industries/zed/issues/7840

We could support this later, but for now, I don't think we need to.

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
2024-02-16 12:45:16 -08:00
Conrad Irwin
19823f2015 panics (#7793)
Release Notes:

- Fix a panic in rename
([#7509](https://github.com/zed-industries/zed/issues/7509)).

---------

Co-authored-by: Max <max@zed.dev>
2024-02-16 13:37:56 -07:00
Conrad Irwin
fd5ea30be3 Fix panic when loading hover state. (#7861)
Release Notes:

- Fixed a panic when hovering over an identifier in the editor
2024-02-16 13:37:49 -07:00
Kirill Bulatov
a441d97cb1 Close modals and menus before dispathing actions (#7830)
Fixes https://github.com/zed-industries/zed/issues/7799 by forcing the
modal to close before dispatching the action.
While not needed specifically for this case, changed the context menus
to do the same, to be uniform — context menu actions seem to work
properly after this change too.

Release Notes:

- Fixed markdown preview action not working
([7799](https://github.com/zed-industries/zed/issues/7799))
2024-02-16 12:15:37 +02:00
Conrad Irwin
734a293899 Fewer nightlys (#7784)
Remove an extraneous /nightly/ from our dSYM paths

Release Notes:

- N/A
2024-02-14 14:50:07 -07:00
Joseph T. Lyons
6e254d9b58 v0.123.x preview 2024-02-14 13:09:52 -05:00
11 changed files with 45 additions and 52 deletions

View File

@@ -125,12 +125,12 @@ jobs:
- name: Build Zed
run: cargo build -p zed
bundle:
name: Bundle app
name: Bundle macOS app
runs-on:
- self-hosted
- bundle
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-build-dmg') }}
needs: [macos_tests, linux_tests]
needs: [macos_tests]
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}

2
Cargo.lock generated
View File

@@ -10793,7 +10793,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.123.1"
version = "0.123.2"
dependencies = [
"activity_indicator",
"ai",

View File

@@ -317,8 +317,8 @@ impl PickerDelegate for CommandPaletteDelegate {
});
let action = command.action;
cx.focus(&self.previous_focus_handle);
cx.dispatch_action(action);
self.dismissed(cx);
cx.dispatch_action(action);
}
fn render_match(

View File

@@ -7660,8 +7660,9 @@ impl Editor {
let snapshot = cursor_buffer.read(cx).snapshot();
let cursor_buffer_offset = cursor_buffer_position.to_offset(&snapshot);
let prepare_rename = project.update(cx, |project, cx| {
project.prepare_rename(cursor_buffer, cursor_buffer_offset, cx)
project.prepare_rename(cursor_buffer.clone(), cursor_buffer_offset, cx)
});
drop(snapshot);
Some(cx.spawn(|this, mut cx| async move {
let rename_range = if let Some(range) = prepare_rename.await? {
@@ -7681,11 +7682,12 @@ impl Editor {
})?
};
if let Some(rename_range) = rename_range {
let rename_buffer_range = rename_range.to_offset(&snapshot);
let cursor_offset_in_rename_range =
cursor_buffer_offset.saturating_sub(rename_buffer_range.start);
this.update(&mut cx, |this, cx| {
let snapshot = cursor_buffer.read(cx).snapshot();
let rename_buffer_range = rename_range.to_offset(&snapshot);
let cursor_offset_in_rename_range =
cursor_buffer_offset.saturating_sub(rename_buffer_range.start);
this.take_rename(false, cx);
let buffer = this.buffer.read(cx).read(cx);
let cursor_offset = selection.head().to_offset(&buffer);

View File

@@ -289,6 +289,7 @@ fn show_hover(
})?;
let hover_result = hover_request.await.ok().flatten();
let snapshot = this.update(&mut cx, |this, cx| this.snapshot(cx))?;
let hover_popover = match hover_result {
Some(hover_result) if !hover_result.is_empty() => {
// Create symbol range of anchors for highlighting and filtering of future requests.

View File

@@ -1,12 +1,11 @@
use client::telemetry::Telemetry;
use editor::{Editor, EditorElement, EditorStyle};
use extension::{Extension, ExtensionStatus, ExtensionStore};
use fs::Fs;
use gpui::{
actions, canvas, uniform_list, AnyElement, AppContext, AvailableSpace, EventEmitter,
FocusableView, FontStyle, FontWeight, InteractiveElement, KeyContext, ParentElement, Render,
Styled, Task, TextStyle, UniformListScrollHandle, View, ViewContext, VisualContext, WeakView,
WhiteSpace, WindowContext,
Styled, Task, TextStyle, UniformListScrollHandle, View, ViewContext, VisualContext, WhiteSpace,
WindowContext,
};
use settings::Settings;
use std::time::Duration;
@@ -32,8 +31,6 @@ pub fn init(cx: &mut AppContext) {
}
pub struct ExtensionsPage {
workspace: WeakView<Workspace>,
fs: Arc<dyn Fs>,
list: UniformListScrollHandle,
telemetry: Arc<Telemetry>,
is_fetching_extensions: bool,
@@ -46,7 +43,7 @@ pub struct ExtensionsPage {
impl ExtensionsPage {
pub fn new(workspace: &Workspace, cx: &mut ViewContext<Workspace>) -> View<Self> {
let extensions_panel = cx.new_view(|cx: &mut ViewContext<Self>| {
cx.new_view(|cx: &mut ViewContext<Self>| {
let store = ExtensionStore::global(cx);
let subscription = cx.observe(&store, |_, _, cx| cx.notify());
@@ -54,8 +51,6 @@ impl ExtensionsPage {
cx.subscribe(&query_editor, Self::on_query_change).detach();
let mut this = Self {
fs: workspace.project().read(cx).fs().clone(),
workspace: workspace.weak_handle(),
list: UniformListScrollHandle::new(),
telemetry: workspace.client().telemetry().clone(),
is_fetching_extensions: false,
@@ -67,8 +62,7 @@ impl ExtensionsPage {
};
this.fetch_extensions(None, cx);
this
});
extensions_panel
})
}
fn install_extension(
@@ -453,25 +447,9 @@ impl Item for ExtensionsPage {
fn clone_on_split(
&self,
_workspace_id: WorkspaceId,
cx: &mut ViewContext<Self>,
_: &mut ViewContext<Self>,
) -> Option<View<Self>> {
Some(cx.new_view(|cx| {
let store = ExtensionStore::global(cx);
let subscription = cx.observe(&store, |_, _, cx| cx.notify());
ExtensionsPage {
fs: self.fs.clone(),
workspace: self.workspace.clone(),
list: UniformListScrollHandle::new(),
telemetry: self.telemetry.clone(),
is_fetching_extensions: false,
extensions_entries: Default::default(),
query_editor: self.query_editor.clone(),
_subscription: subscription,
query_contains_error: false,
extension_fetch_task: None,
}
}))
None
}
fn to_item_events(event: &Self::Event, mut f: impl FnMut(workspace::item::ItemEvent)) {

View File

@@ -50,7 +50,6 @@ pub struct ExcerptId(usize);
pub struct MultiBuffer {
snapshot: RefCell<MultiBufferSnapshot>,
buffers: RefCell<HashMap<BufferId, BufferState>>,
next_excerpt_id: usize,
subscriptions: Topic,
singleton: bool,
replica_id: ReplicaId,
@@ -232,7 +231,6 @@ impl MultiBuffer {
Self {
snapshot: Default::default(),
buffers: Default::default(),
next_excerpt_id: 1,
subscriptions: Default::default(),
singleton: false,
capability,
@@ -272,7 +270,6 @@ impl MultiBuffer {
Self {
snapshot: RefCell::new(self.snapshot.borrow().clone()),
buffers: RefCell::new(buffers),
next_excerpt_id: 1,
subscriptions: Default::default(),
singleton: self.singleton,
capability: self.capability,
@@ -993,7 +990,12 @@ impl MultiBuffer {
O: text::ToOffset,
{
let mut ids = Vec::new();
let mut next_excerpt_id = self.next_excerpt_id;
let mut next_excerpt_id =
if let Some(last_entry) = self.snapshot.borrow().excerpt_ids.last() {
last_entry.id.0 + 1
} else {
1
};
self.insert_excerpts_with_ids_after(
prev_excerpt_id,
buffer,
@@ -1079,9 +1081,6 @@ impl MultiBuffer {
..buffer_snapshot.anchor_after(&primary.end)
}),
};
if id.0 >= self.next_excerpt_id {
self.next_excerpt_id = id.0 + 1;
}
excerpts.push((id, range.clone()));
let excerpt = Excerpt::new(
id,
@@ -1093,6 +1092,10 @@ impl MultiBuffer {
);
new_excerpts.push(excerpt, &());
prev_locator = locator.clone();
if let Some(last_mapping_entry) = new_excerpt_ids.last() {
assert!(id > last_mapping_entry.id, "excerpt ids must be increasing");
}
new_excerpt_ids.push(ExcerptIdMapping { id, locator }, &());
}

View File

@@ -224,8 +224,8 @@ impl ContextMenu {
.timer(Duration::from_millis(50))
.await;
this.update(&mut cx, |this, cx| {
this.cancel(&menu::Cancel, cx);
cx.dispatch_action(action);
this.cancel(&menu::Cancel, cx)
})
})
.detach_and_log_err(cx);

View File

@@ -2,7 +2,7 @@
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.123.1"
version = "0.123.2"
publish = false
license = "GPL-3.0-or-later"

View File

@@ -1 +1 @@
dev
preview

View File

@@ -36,12 +36,11 @@ function uploadDsym
REGION="nyc3"
file_to_upload="$1"
file_name="$2"
space_path="nightly"
date=$(date +"%a, %d %b %Y %T %z")
acl="x-amz-acl:public-read"
content_type="application/octet-stream"
storage_type="x-amz-storage-class:STANDARD"
string="PUT\n\n${content_type}\n${date}\n${acl}\n${storage_type}\n/${SPACE}/${space_path}/${file_name}"
string="PUT\n\n${content_type}\n${date}\n${acl}\n${storage_type}\n/${SPACE}/${file_name}"
signature=$(echo -en "${string}" | openssl sha1 -hmac "${DIGITALOCEAN_SPACES_SECRET_KEY}" -binary | base64)
curl --fail -vv -s -X PUT -T "$file_to_upload" \
@@ -51,7 +50,7 @@ function uploadDsym
-H "$storage_type" \
-H "$acl" \
-H "Authorization: AWS ${DIGITALOCEAN_SPACES_ACCESS_KEY}:$signature" \
"https://${SPACE}.${REGION}.digitaloceanspaces.com/${space_path}/${file_name}"
"https://${SPACE}.${REGION}.digitaloceanspaces.com/${file_name}"
}
while getopts 'dlfoh' flag
@@ -142,8 +141,18 @@ if [ "$local_arch" = false ]; then
if [ "$channel" == "nightly" ]; then
version="$version-$(git rev-parse --short HEAD)"
fi
uploadDsym target/aarch64-apple-darwin/release/Zed.dwarf "$channel/Zed-$version-aarch64-apple-darwin.dwarf"
uploadDsym target/x86_64-apple-darwin/release/Zed.dwarf "$channel/Zed-$version-x86_64-apple-darwin.dwarf"
echo "Removing existing gzipped dSYMs"
rm -f target/aarch64-apple-darwin/release/Zed.dwarf.gz
rm -f target/x86_64-apple-darwin/release/Zed.dwarf.gz
echo "Gzipping dSYMs"
gzip target/aarch64-apple-darwin/release/Zed.dwarf
gzip target/x86_64-apple-darwin/release/Zed.dwarf
echo "Uploading dSYMs"
uploadDsym target/aarch64-apple-darwin/release/Zed.dwarf.gz "$channel/Zed-$version-aarch64-apple-darwin.dwarf.gz"
uploadDsym target/x86_64-apple-darwin/release/Zed.dwarf.gz "$channel/Zed-$version-x86_64-apple-darwin.dwarf.gz"
echo "Creating fat binaries"
lipo \