From d30e129d63d7438e717fdc958dd2473dea05fd3b Mon Sep 17 00:00:00 2001 From: Petros Amoiridis Date: Thu, 19 Jan 2023 19:38:05 +0200 Subject: [PATCH 1/6] Create files passed as args to CLI Co-Authored-by: Mikayla --- crates/cli/src/main.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 4bc2d6e73d..a31e59587f 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -9,7 +9,13 @@ use core_foundation::{ use core_services::{kLSLaunchDefaults, LSLaunchURLSpec, LSOpenFromURLSpec, TCFType}; use ipc_channel::ipc::{IpcOneShotServer, IpcReceiver, IpcSender}; use serde::Deserialize; -use std::{ffi::OsStr, fs, path::PathBuf, ptr}; +use std::{ + ffi::OsStr, + fs::{self, OpenOptions}, + io, + path::{Path, PathBuf}, + ptr, +}; #[derive(Parser)] #[clap(name = "zed", global_setting(clap::AppSettings::NoAutoVersion))] @@ -54,6 +60,12 @@ fn main() -> Result<()> { return Ok(()); } + for path in args.paths.iter() { + if !path.exists() { + touch(path.as_path())?; + } + } + let (tx, rx) = launch_app(bundle_path)?; tx.send(CliRequest::Open { @@ -77,6 +89,13 @@ fn main() -> Result<()> { Ok(()) } +fn touch(path: &Path) -> io::Result<()> { + match OpenOptions::new().create(true).write(true).open(path) { + Ok(_) => Ok(()), + Err(e) => Err(e), + } +} + fn locate_bundle() -> Result { let cli_path = std::env::current_exe()?.canonicalize()?; let mut app_path = cli_path.clone(); From 95b259b841898caf5f720b10e34115bb5b489bc8 Mon Sep 17 00:00:00 2001 From: Julia Date: Mon, 23 Jan 2023 11:43:50 -0500 Subject: [PATCH 2/6] Avoid stomping on tab close icon's cursor style --- crates/workspace/src/pane.rs | 87 ++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 8d0d731551..f9124bfd83 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1150,7 +1150,7 @@ impl Pane { row.add_child({ enum Tab {} - dragged_item_receiver::(ix, ix, true, None, cx, { + let mut receiver = dragged_item_receiver::(ix, ix, true, None, cx, { let item = item.clone(); let pane = pane.clone(); let detail = detail.clone(); @@ -1162,50 +1162,51 @@ impl Pane { let hovered = mouse_state.hovered(); Self::render_tab(&item, pane, ix == 0, detail, hovered, tab_style, cx) } - }) - .with_cursor_style(if pane_active && tab_active { - CursorStyle::Arrow - } else { - CursorStyle::PointingHand - }) - .on_down(MouseButton::Left, move |_, cx| { - cx.dispatch_action(ActivateItem(ix)); - cx.propagate_event(); - }) - .on_click(MouseButton::Middle, { - let item = item.clone(); - let pane = pane.clone(); - move |_, cx: &mut EventContext| { - cx.dispatch_action(CloseItem { - item_id: item.id(), - pane: pane.clone(), - }) - } - }) - .as_draggable( - DraggedItem { - item, - pane: pane.clone(), - }, - { - let theme = cx.global::().theme.clone(); + }); - let detail = detail.clone(); - move |dragged_item, cx: &mut RenderContext| { - let tab_style = &theme.workspace.tab_bar.dragged_tab; - Self::render_tab( - &dragged_item.item, - dragged_item.pane.clone(), - false, - detail, - false, - &tab_style, - cx, - ) + if !pane_active || !tab_active { + receiver = receiver.with_cursor_style(CursorStyle::PointingHand); + } + + receiver + .on_down(MouseButton::Left, move |_, cx| { + cx.dispatch_action(ActivateItem(ix)); + cx.propagate_event(); + }) + .on_click(MouseButton::Middle, { + let item = item.clone(); + let pane = pane.clone(); + move |_, cx: &mut EventContext| { + cx.dispatch_action(CloseItem { + item_id: item.id(), + pane: pane.clone(), + }) } - }, - ) - .boxed() + }) + .as_draggable( + DraggedItem { + item, + pane: pane.clone(), + }, + { + let theme = cx.global::().theme.clone(); + + let detail = detail.clone(); + move |dragged_item, cx: &mut RenderContext| { + let tab_style = &theme.workspace.tab_bar.dragged_tab; + Self::render_tab( + &dragged_item.item, + dragged_item.pane.clone(), + false, + detail, + false, + &tab_style, + cx, + ) + } + }, + ) + .boxed() }) } From 4609be20deee44f61692dddd9900f3c05423a675 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 11 Jan 2023 17:52:18 -0800 Subject: [PATCH 3/6] WIP: Adding license compliance to CI --- licenses/test.tx | 1 + licenses/test.txt | 1 + script/collect-licenses.js | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 licenses/test.tx create mode 100644 licenses/test.txt create mode 100755 script/collect-licenses.js diff --git a/licenses/test.tx b/licenses/test.tx new file mode 100644 index 0000000000..9f27c62f59 --- /dev/null +++ b/licenses/test.tx @@ -0,0 +1 @@ +DATA DATA DATA \ No newline at end of file diff --git a/licenses/test.txt b/licenses/test.txt new file mode 100644 index 0000000000..b18c75c886 --- /dev/null +++ b/licenses/test.txt @@ -0,0 +1 @@ +Test test \ No newline at end of file diff --git a/script/collect-licenses.js b/script/collect-licenses.js new file mode 100755 index 0000000000..a0193a4899 --- /dev/null +++ b/script/collect-licenses.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node + +const fs = require('fs'); + +const file_name = (path) => "./licenses/".concat(path); + +const writeFile = (path, data) => { + fs.writeFile(file_name(path), data, (err) => { + if (err) throw err; + console.log("Saved file") + }); +} + +main(); + +async function main() { + console.log("Here!"); + + writeFile("test.tx", "DATA DATA DATA") + + // Next steps: + // 1a. Add wiring in Zed to check for a licenses markdown file + // 1b. Add wiring in Zed.dev for builds to publish licenses alongside releases as well as licenses for Zed.dev itself + // 2. Figure out how to run those commands and get the license text for each MIT and Apache licensed software + // 3. Add in the configuration file: + // a. and refactor this script to have types of licenses + // b. add callback handlers for each type, + // c. check if the handler succeeds +} \ No newline at end of file From 9d5803206456f76abde64eb6d05ce3ac28202eda Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Fri, 13 Jan 2023 14:53:44 -0800 Subject: [PATCH 4/6] Add action to open licenses file --- assets/licenses.md | 1 + crates/workspace/src/workspace.rs | 1 + crates/zed/src/zed.rs | 25 +++++++++++++++++++++---- licenses/test.tx | 1 - licenses/test.txt | 1 - script/collect-licenses.js | 29 ----------------------------- script/collect-licenses.rs | 17 +++++++++++++++++ 7 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 assets/licenses.md delete mode 100644 licenses/test.tx delete mode 100644 licenses/test.txt delete mode 100755 script/collect-licenses.js create mode 100755 script/collect-licenses.rs diff --git a/assets/licenses.md b/assets/licenses.md new file mode 100644 index 0000000000..b4c705632b --- /dev/null +++ b/assets/licenses.md @@ -0,0 +1 @@ +TWSTS \ No newline at end of file diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 8735f33fbe..e8af0d62fc 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -233,6 +233,7 @@ pub fn init(app_state: Arc, cx: &mut MutableAppContext) { workspace.toggle_sidebar(SidebarSide::Right, cx); }); cx.add_action(Workspace::activate_pane_at_index); + cx.add_action(Workspace::split_pane_with_item); cx.add_action(Workspace::split_pane_with_project_entry); diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index b6b00e7869..30f5bef53b 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -62,6 +62,7 @@ actions!( DebugElements, OpenSettings, OpenLog, + OpenLicenses, OpenTelemetryLog, OpenKeymap, OpenDefaultSettings, @@ -184,6 +185,19 @@ pub fn init(app_state: &Arc, cx: &mut gpui::MutableAppContext) { open_log_file(workspace, app_state.clone(), cx); } }); + cx.add_action({ + let app_state = app_state.clone(); + move |workspace: &mut Workspace, _: &OpenLicenses, cx: &mut ViewContext| { + open_bundled_file( + workspace, + app_state.clone(), + "licenses.md", + "Open Source License Attribution", + "Markdown", + cx, + ); + } + }); cx.add_action({ let app_state = app_state.clone(); move |workspace: &mut Workspace, _: &OpenTelemetryLog, cx: &mut ViewContext| { @@ -199,11 +213,12 @@ pub fn init(app_state: &Arc, cx: &mut gpui::MutableAppContext) { cx.add_action({ let app_state = app_state.clone(); move |workspace: &mut Workspace, _: &OpenDefaultKeymap, cx: &mut ViewContext| { - open_bundled_config_file( + open_bundled_file( workspace, app_state.clone(), "keymaps/default.json", "Default Key Bindings", + "JSON", cx, ); } @@ -213,11 +228,12 @@ pub fn init(app_state: &Arc, cx: &mut gpui::MutableAppContext) { move |workspace: &mut Workspace, _: &OpenDefaultSettings, cx: &mut ViewContext| { - open_bundled_config_file( + open_bundled_file( workspace, app_state.clone(), "settings/default.json", "Default Settings", + "JSON", cx, ); } @@ -656,11 +672,12 @@ fn open_telemetry_log_file( }).detach(); } -fn open_bundled_config_file( +fn open_bundled_file( workspace: &mut Workspace, app_state: Arc, asset_path: &'static str, title: &'static str, + language: &'static str, cx: &mut ViewContext, ) { workspace @@ -670,7 +687,7 @@ fn open_bundled_config_file( let text = Assets::get(asset_path).unwrap().data; let text = str::from_utf8(text.as_ref()).unwrap(); project - .create_buffer(text, project.languages().get_language("JSON"), cx) + .create_buffer(text, project.languages().get_language(language), cx) .expect("creating buffers on a local workspace always succeeds") }); let buffer = diff --git a/licenses/test.tx b/licenses/test.tx deleted file mode 100644 index 9f27c62f59..0000000000 --- a/licenses/test.tx +++ /dev/null @@ -1 +0,0 @@ -DATA DATA DATA \ No newline at end of file diff --git a/licenses/test.txt b/licenses/test.txt deleted file mode 100644 index b18c75c886..0000000000 --- a/licenses/test.txt +++ /dev/null @@ -1 +0,0 @@ -Test test \ No newline at end of file diff --git a/script/collect-licenses.js b/script/collect-licenses.js deleted file mode 100755 index a0193a4899..0000000000 --- a/script/collect-licenses.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs'); - -const file_name = (path) => "./licenses/".concat(path); - -const writeFile = (path, data) => { - fs.writeFile(file_name(path), data, (err) => { - if (err) throw err; - console.log("Saved file") - }); -} - -main(); - -async function main() { - console.log("Here!"); - - writeFile("test.tx", "DATA DATA DATA") - - // Next steps: - // 1a. Add wiring in Zed to check for a licenses markdown file - // 1b. Add wiring in Zed.dev for builds to publish licenses alongside releases as well as licenses for Zed.dev itself - // 2. Figure out how to run those commands and get the license text for each MIT and Apache licensed software - // 3. Add in the configuration file: - // a. and refactor this script to have types of licenses - // b. add callback handlers for each type, - // c. check if the handler succeeds -} \ No newline at end of file diff --git a/script/collect-licenses.rs b/script/collect-licenses.rs new file mode 100755 index 0000000000..2814feaa08 --- /dev/null +++ b/script/collect-licenses.rs @@ -0,0 +1,17 @@ +//usr/bin/env rustc $0 -o a.out && ./a.out ; rm -f ./a.out ; exit + +fn main() { + println!("Hello world"); + + +} + +// Next steps: +// 1a. Add wiring in Zed to check for a licenses markdown file +// 1b. Add wiring in Zed.dev for builds to publish licenses alongside releases as well as licenses for Zed.dev itself +// (e.g. https://github.com/zed-industries/zed.dev/tree/main/content/licenses) +// 2. Figure out how to run those commands and get the license text for each MIT and Apache licensed software +// 3. Add in the configuration file: +// a. and refactor this script to have types of licenses +// b. add callback handlers for each type, +// c. check if the handler succeeds From d060114f00c198f72f0e571464893cf55c100545 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Wed, 18 Jan 2023 12:28:02 -0800 Subject: [PATCH 5/6] Added complete scripts for generating third party license files --- assets/licenses.md | 2 +- crates/activity_indicator/Cargo.toml | 1 + crates/assets/Cargo.toml | 1 + crates/auto_update/Cargo.toml | 1 + crates/breadcrumbs/Cargo.toml | 1 + crates/call/Cargo.toml | 1 + crates/cli/Cargo.toml | 1 + crates/client/Cargo.toml | 1 + crates/clock/Cargo.toml | 1 + crates/collab/Cargo.toml | 1 + crates/collab_ui/Cargo.toml | 1 + crates/collections/Cargo.toml | 1 + crates/command_palette/Cargo.toml | 1 + crates/context_menu/Cargo.toml | 1 + crates/db/Cargo.toml | 1 + crates/diagnostics/Cargo.toml | 1 + crates/drag_and_drop/Cargo.toml | 1 + crates/editor/Cargo.toml | 1 + crates/file_finder/Cargo.toml | 1 + crates/fs/Cargo.toml | 1 + crates/fsevent/Cargo.toml | 1 + crates/fuzzy/Cargo.toml | 1 + crates/git/Cargo.toml | 1 + crates/go_to_line/Cargo.toml | 1 + crates/gpui/Cargo.toml | 1 + crates/gpui_macros/Cargo.toml | 1 + crates/journal/Cargo.toml | 1 + crates/language/Cargo.toml | 1 + crates/live_kit_client/Cargo.toml | 1 + crates/live_kit_server/Cargo.toml | 1 + crates/lsp/Cargo.toml | 1 + crates/media/Cargo.toml | 1 + crates/menu/Cargo.toml | 1 + crates/outline/Cargo.toml | 1 + crates/picker/Cargo.toml | 1 + crates/plugin/Cargo.toml | 1 + crates/plugin_macros/Cargo.toml | 1 + crates/plugin_runtime/Cargo.toml | 1 + crates/project/Cargo.toml | 1 + crates/project_panel/Cargo.toml | 1 + crates/project_symbols/Cargo.toml | 1 + crates/recent_projects/Cargo.toml | 1 + crates/rope/Cargo.toml | 1 + crates/rpc/Cargo.toml | 1 + crates/search/Cargo.toml | 1 + crates/settings/Cargo.toml | 1 + crates/snippet/Cargo.toml | 1 + crates/sqlez/Cargo.toml | 1 + crates/sqlez_macros/Cargo.toml | 1 + crates/sum_tree/Cargo.toml | 1 + crates/terminal/Cargo.toml | 1 + crates/terminal_view/Cargo.toml | 1 + crates/text/Cargo.toml | 1 + crates/theme/Cargo.toml | 1 + crates/theme_selector/Cargo.toml | 1 + crates/theme_testbench/Cargo.toml | 1 + crates/util/Cargo.toml | 1 + crates/vim/Cargo.toml | 1 + crates/workspace/Cargo.toml | 1 + crates/zed/Cargo.toml | 1 + script/collect-licenses.rs | 17 ------------- script/generate-licenses | 10 ++++++++ script/licenses/template.hbs.md | 27 ++++++++++++++++++++ script/licenses/zed-licenses.toml | 37 ++++++++++++++++++++++++++++ styles/src/themes/one-light.ts | 18 +++++++------- 65 files changed, 143 insertions(+), 27 deletions(-) delete mode 100755 script/collect-licenses.rs create mode 100755 script/generate-licenses create mode 100644 script/licenses/template.hbs.md create mode 100644 script/licenses/zed-licenses.toml diff --git a/assets/licenses.md b/assets/licenses.md index b4c705632b..5d70eab88b 100644 --- a/assets/licenses.md +++ b/assets/licenses.md @@ -1 +1 @@ -TWSTS \ No newline at end of file +Place holder \ No newline at end of file diff --git a/crates/activity_indicator/Cargo.toml b/crates/activity_indicator/Cargo.toml index 63998fa47b..78a4e752b2 100644 --- a/crates/activity_indicator/Cargo.toml +++ b/crates/activity_indicator/Cargo.toml @@ -2,6 +2,7 @@ name = "activity_indicator" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/activity_indicator.rs" diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml index 71db57f320..ca96c92602 100644 --- a/crates/assets/Cargo.toml +++ b/crates/assets/Cargo.toml @@ -2,6 +2,7 @@ name = "assets" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/assets.rs" diff --git a/crates/auto_update/Cargo.toml b/crates/auto_update/Cargo.toml index b1ca061614..5f672e759f 100644 --- a/crates/auto_update/Cargo.toml +++ b/crates/auto_update/Cargo.toml @@ -2,6 +2,7 @@ name = "auto_update" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/auto_update.rs" diff --git a/crates/breadcrumbs/Cargo.toml b/crates/breadcrumbs/Cargo.toml index e5cae74e8f..99476fdc0a 100644 --- a/crates/breadcrumbs/Cargo.toml +++ b/crates/breadcrumbs/Cargo.toml @@ -2,6 +2,7 @@ name = "breadcrumbs" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/breadcrumbs.rs" diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.toml index e6aa357bef..156925fb72 100644 --- a/crates/call/Cargo.toml +++ b/crates/call/Cargo.toml @@ -2,6 +2,7 @@ name = "call" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/call.rs" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index fafcc5ab68..f2bab22ea7 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -2,6 +2,7 @@ name = "cli" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/cli.rs" diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 74533fbc3b..347424d34e 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -2,6 +2,7 @@ name = "client" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/client.rs" diff --git a/crates/clock/Cargo.toml b/crates/clock/Cargo.toml index 8e17e15e5e..1705fdc6d5 100644 --- a/crates/clock/Cargo.toml +++ b/crates/clock/Cargo.toml @@ -2,6 +2,7 @@ name = "clock" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/clock.rs" diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml index 8c21af7273..456bcf6531 100644 --- a/crates/collab/Cargo.toml +++ b/crates/collab/Cargo.toml @@ -4,6 +4,7 @@ default-run = "collab" edition = "2021" name = "collab" version = "0.5.3" +publish = false [[bin]] name = "collab" diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml index 20db066ce7..ac13e361fd 100644 --- a/crates/collab_ui/Cargo.toml +++ b/crates/collab_ui/Cargo.toml @@ -2,6 +2,7 @@ name = "collab_ui" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/collab_ui.rs" diff --git a/crates/collections/Cargo.toml b/crates/collections/Cargo.toml index 8e18cbd11d..dcbc642c4c 100644 --- a/crates/collections/Cargo.toml +++ b/crates/collections/Cargo.toml @@ -2,6 +2,7 @@ name = "collections" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/collections.rs" diff --git a/crates/command_palette/Cargo.toml b/crates/command_palette/Cargo.toml index 85f5b36ed6..555deff1ce 100644 --- a/crates/command_palette/Cargo.toml +++ b/crates/command_palette/Cargo.toml @@ -2,6 +2,7 @@ name = "command_palette" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/command_palette.rs" diff --git a/crates/context_menu/Cargo.toml b/crates/context_menu/Cargo.toml index 817893f43e..d764d4ddb8 100644 --- a/crates/context_menu/Cargo.toml +++ b/crates/context_menu/Cargo.toml @@ -2,6 +2,7 @@ name = "context_menu" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/context_menu.rs" diff --git a/crates/db/Cargo.toml b/crates/db/Cargo.toml index 8e12b06027..496e61b811 100644 --- a/crates/db/Cargo.toml +++ b/crates/db/Cargo.toml @@ -2,6 +2,7 @@ name = "db" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/db.rs" diff --git a/crates/diagnostics/Cargo.toml b/crates/diagnostics/Cargo.toml index 616f69117f..ebb57e0636 100644 --- a/crates/diagnostics/Cargo.toml +++ b/crates/diagnostics/Cargo.toml @@ -2,6 +2,7 @@ name = "diagnostics" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/diagnostics.rs" diff --git a/crates/drag_and_drop/Cargo.toml b/crates/drag_and_drop/Cargo.toml index 4ab54ad8e6..e378a5bc31 100644 --- a/crates/drag_and_drop/Cargo.toml +++ b/crates/drag_and_drop/Cargo.toml @@ -2,6 +2,7 @@ name = "drag_and_drop" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/drag_and_drop.rs" diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml index f992ed5116..26dd371041 100644 --- a/crates/editor/Cargo.toml +++ b/crates/editor/Cargo.toml @@ -2,6 +2,7 @@ name = "editor" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/editor.rs" diff --git a/crates/file_finder/Cargo.toml b/crates/file_finder/Cargo.toml index 6fd792940d..1d1a4dfb1b 100644 --- a/crates/file_finder/Cargo.toml +++ b/crates/file_finder/Cargo.toml @@ -2,6 +2,7 @@ name = "file_finder" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/file_finder.rs" diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml index 5b9082d114..cd6c8f969c 100644 --- a/crates/fs/Cargo.toml +++ b/crates/fs/Cargo.toml @@ -2,6 +2,7 @@ name = "fs" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/fs.rs" diff --git a/crates/fsevent/Cargo.toml b/crates/fsevent/Cargo.toml index 3bf7ae885b..e71e247bf2 100644 --- a/crates/fsevent/Cargo.toml +++ b/crates/fsevent/Cargo.toml @@ -3,6 +3,7 @@ name = "fsevent" version = "2.0.2" license = "MIT" edition = "2021" +publish = false [lib] path = "src/fsevent.rs" diff --git a/crates/fuzzy/Cargo.toml b/crates/fuzzy/Cargo.toml index e36c22055a..553c0497a5 100644 --- a/crates/fuzzy/Cargo.toml +++ b/crates/fuzzy/Cargo.toml @@ -2,6 +2,7 @@ name = "fuzzy" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/fuzzy.rs" diff --git a/crates/git/Cargo.toml b/crates/git/Cargo.toml index 66202a489a..3e88d72313 100644 --- a/crates/git/Cargo.toml +++ b/crates/git/Cargo.toml @@ -2,6 +2,7 @@ name = "git" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/git.rs" diff --git a/crates/go_to_line/Cargo.toml b/crates/go_to_line/Cargo.toml index 93ae96f93e..def6361dc2 100644 --- a/crates/go_to_line/Cargo.toml +++ b/crates/go_to_line/Cargo.toml @@ -2,6 +2,7 @@ name = "go_to_line" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/go_to_line.rs" diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml index 5153c1f7c1..e1b6e11b46 100644 --- a/crates/gpui/Cargo.toml +++ b/crates/gpui/Cargo.toml @@ -4,6 +4,7 @@ edition = "2021" name = "gpui" version = "0.1.0" description = "A GPU-accelerated UI framework" +publish = false [lib] path = "src/gpui.rs" diff --git a/crates/gpui_macros/Cargo.toml b/crates/gpui_macros/Cargo.toml index e35e0b1d2b..76daeae2a8 100644 --- a/crates/gpui_macros/Cargo.toml +++ b/crates/gpui_macros/Cargo.toml @@ -2,6 +2,7 @@ name = "gpui_macros" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/gpui_macros.rs" diff --git a/crates/journal/Cargo.toml b/crates/journal/Cargo.toml index 9622049a9c..b532397dd1 100644 --- a/crates/journal/Cargo.toml +++ b/crates/journal/Cargo.toml @@ -2,6 +2,7 @@ name = "journal" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/journal.rs" diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml index 6c074a2d75..ab6c687b7a 100644 --- a/crates/language/Cargo.toml +++ b/crates/language/Cargo.toml @@ -2,6 +2,7 @@ name = "language" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/language.rs" diff --git a/crates/live_kit_client/Cargo.toml b/crates/live_kit_client/Cargo.toml index d0f54782b9..0145737508 100644 --- a/crates/live_kit_client/Cargo.toml +++ b/crates/live_kit_client/Cargo.toml @@ -3,6 +3,7 @@ name = "live_kit_client" version = "0.1.0" edition = "2021" description = "Bindings to LiveKit Swift client SDK" +publish = false [lib] path = "src/live_kit_client.rs" diff --git a/crates/live_kit_server/Cargo.toml b/crates/live_kit_server/Cargo.toml index 64267f62d1..17ee3cd62e 100644 --- a/crates/live_kit_server/Cargo.toml +++ b/crates/live_kit_server/Cargo.toml @@ -3,6 +3,7 @@ name = "live_kit_server" version = "0.1.0" edition = "2021" description = "SDK for the LiveKit server API" +publish = false [lib] path = "src/live_kit_server.rs" diff --git a/crates/lsp/Cargo.toml b/crates/lsp/Cargo.toml index 94780a9472..eb6e02aac9 100644 --- a/crates/lsp/Cargo.toml +++ b/crates/lsp/Cargo.toml @@ -2,6 +2,7 @@ name = "lsp" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/lsp.rs" diff --git a/crates/media/Cargo.toml b/crates/media/Cargo.toml index aad2b74c02..4c230819e2 100644 --- a/crates/media/Cargo.toml +++ b/crates/media/Cargo.toml @@ -2,6 +2,7 @@ name = "media" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/media.rs" diff --git a/crates/menu/Cargo.toml b/crates/menu/Cargo.toml index cdcacd4416..c473df7ef0 100644 --- a/crates/menu/Cargo.toml +++ b/crates/menu/Cargo.toml @@ -2,6 +2,7 @@ name = "menu" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/menu.rs" diff --git a/crates/outline/Cargo.toml b/crates/outline/Cargo.toml index 5b4751e620..661c84c8cd 100644 --- a/crates/outline/Cargo.toml +++ b/crates/outline/Cargo.toml @@ -2,6 +2,7 @@ name = "outline" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/outline.rs" diff --git a/crates/picker/Cargo.toml b/crates/picker/Cargo.toml index 6438697910..e7a8079caa 100644 --- a/crates/picker/Cargo.toml +++ b/crates/picker/Cargo.toml @@ -2,6 +2,7 @@ name = "picker" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/picker.rs" diff --git a/crates/plugin/Cargo.toml b/crates/plugin/Cargo.toml index 6f37c458d9..7bf5510465 100644 --- a/crates/plugin/Cargo.toml +++ b/crates/plugin/Cargo.toml @@ -2,6 +2,7 @@ name = "plugin" version = "0.1.0" edition = "2021" +publish = false [dependencies] serde = "1.0" diff --git a/crates/plugin_macros/Cargo.toml b/crates/plugin_macros/Cargo.toml index b0a2c4e09b..32bfc6a01a 100644 --- a/crates/plugin_macros/Cargo.toml +++ b/crates/plugin_macros/Cargo.toml @@ -2,6 +2,7 @@ name = "plugin_macros" version = "0.1.0" edition = "2021" +publish = false [lib] proc-macro = true diff --git a/crates/plugin_runtime/Cargo.toml b/crates/plugin_runtime/Cargo.toml index a8c0a063a8..b5cfb9514f 100644 --- a/crates/plugin_runtime/Cargo.toml +++ b/crates/plugin_runtime/Cargo.toml @@ -2,6 +2,7 @@ name = "plugin_runtime" version = "0.1.0" edition = "2021" +publish = false [dependencies] wasmtime = "0.38" diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 6d6560ea38..949dbdf916 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -2,6 +2,7 @@ name = "project" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/project.rs" diff --git a/crates/project_panel/Cargo.toml b/crates/project_panel/Cargo.toml index 8704f57c8c..cc27f40954 100644 --- a/crates/project_panel/Cargo.toml +++ b/crates/project_panel/Cargo.toml @@ -2,6 +2,7 @@ name = "project_panel" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/project_panel.rs" diff --git a/crates/project_symbols/Cargo.toml b/crates/project_symbols/Cargo.toml index a426e2e0d4..e9283b14c9 100644 --- a/crates/project_symbols/Cargo.toml +++ b/crates/project_symbols/Cargo.toml @@ -2,6 +2,7 @@ name = "project_symbols" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/project_symbols.rs" diff --git a/crates/recent_projects/Cargo.toml b/crates/recent_projects/Cargo.toml index d633381365..037c6fd4fb 100644 --- a/crates/recent_projects/Cargo.toml +++ b/crates/recent_projects/Cargo.toml @@ -2,6 +2,7 @@ name = "recent_projects" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/recent_projects.rs" diff --git a/crates/rope/Cargo.toml b/crates/rope/Cargo.toml index e9ddcc8195..8257ef4a6e 100644 --- a/crates/rope/Cargo.toml +++ b/crates/rope/Cargo.toml @@ -2,6 +2,7 @@ name = "rope" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/rope.rs" diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml index cd959e75a1..25c2ce1ca7 100644 --- a/crates/rpc/Cargo.toml +++ b/crates/rpc/Cargo.toml @@ -3,6 +3,7 @@ description = "Shared logic for communication between the Zed app and the zed.de edition = "2021" name = "rpc" version = "0.1.0" +publish = false [lib] path = "src/rpc.rs" diff --git a/crates/search/Cargo.toml b/crates/search/Cargo.toml index 3a5d9468fc..f36865a89b 100644 --- a/crates/search/Cargo.toml +++ b/crates/search/Cargo.toml @@ -2,6 +2,7 @@ name = "search" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/search.rs" diff --git a/crates/settings/Cargo.toml b/crates/settings/Cargo.toml index a292358e75..c1ec2a6210 100644 --- a/crates/settings/Cargo.toml +++ b/crates/settings/Cargo.toml @@ -2,6 +2,7 @@ name = "settings" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/settings.rs" diff --git a/crates/snippet/Cargo.toml b/crates/snippet/Cargo.toml index 03a0f8314a..429f5d416e 100644 --- a/crates/snippet/Cargo.toml +++ b/crates/snippet/Cargo.toml @@ -2,6 +2,7 @@ name = "snippet" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/snippet.rs" diff --git a/crates/sqlez/Cargo.toml b/crates/sqlez/Cargo.toml index 78bf83dc30..8409a1dff5 100644 --- a/crates/sqlez/Cargo.toml +++ b/crates/sqlez/Cargo.toml @@ -2,6 +2,7 @@ name = "sqlez" version = "0.1.0" edition = "2021" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/sqlez_macros/Cargo.toml b/crates/sqlez_macros/Cargo.toml index 423b494500..8d650074c3 100644 --- a/crates/sqlez_macros/Cargo.toml +++ b/crates/sqlez_macros/Cargo.toml @@ -2,6 +2,7 @@ name = "sqlez_macros" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/sqlez_macros.rs" diff --git a/crates/sum_tree/Cargo.toml b/crates/sum_tree/Cargo.toml index 02cad4fb9d..3aab16cc3e 100644 --- a/crates/sum_tree/Cargo.toml +++ b/crates/sum_tree/Cargo.toml @@ -2,6 +2,7 @@ name = "sum_tree" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/sum_tree.rs" diff --git a/crates/terminal/Cargo.toml b/crates/terminal/Cargo.toml index 0dea7bfbcf..c6f33a0fc7 100644 --- a/crates/terminal/Cargo.toml +++ b/crates/terminal/Cargo.toml @@ -2,6 +2,7 @@ name = "terminal" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/terminal.rs" diff --git a/crates/terminal_view/Cargo.toml b/crates/terminal_view/Cargo.toml index 05fda2c75f..f12e4be03b 100644 --- a/crates/terminal_view/Cargo.toml +++ b/crates/terminal_view/Cargo.toml @@ -2,6 +2,7 @@ name = "terminal_view" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/terminal_view.rs" diff --git a/crates/text/Cargo.toml b/crates/text/Cargo.toml index ad960ec93e..5fda4b613c 100644 --- a/crates/text/Cargo.toml +++ b/crates/text/Cargo.toml @@ -2,6 +2,7 @@ name = "text" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/text.rs" diff --git a/crates/theme/Cargo.toml b/crates/theme/Cargo.toml index 36de158afe..1e9883860f 100644 --- a/crates/theme/Cargo.toml +++ b/crates/theme/Cargo.toml @@ -2,6 +2,7 @@ name = "theme" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/theme.rs" diff --git a/crates/theme_selector/Cargo.toml b/crates/theme_selector/Cargo.toml index 59cb5fbc2c..8f6fc74600 100644 --- a/crates/theme_selector/Cargo.toml +++ b/crates/theme_selector/Cargo.toml @@ -2,6 +2,7 @@ name = "theme_selector" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/theme_selector.rs" diff --git a/crates/theme_testbench/Cargo.toml b/crates/theme_testbench/Cargo.toml index 5fb263501f..763727fc68 100644 --- a/crates/theme_testbench/Cargo.toml +++ b/crates/theme_testbench/Cargo.toml @@ -2,6 +2,7 @@ name = "theme_testbench" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/theme_testbench.rs" diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.toml index 0a0bacf53c..4cbaa382e8 100644 --- a/crates/util/Cargo.toml +++ b/crates/util/Cargo.toml @@ -2,6 +2,7 @@ name = "util" version = "0.1.0" edition = "2021" +publish = false [lib] doctest = false diff --git a/crates/vim/Cargo.toml b/crates/vim/Cargo.toml index daefebdbdd..bd94e48b9e 100644 --- a/crates/vim/Cargo.toml +++ b/crates/vim/Cargo.toml @@ -2,6 +2,7 @@ name = "vim" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/vim.rs" diff --git a/crates/workspace/Cargo.toml b/crates/workspace/Cargo.toml index 5894a2a44e..60680f82a2 100644 --- a/crates/workspace/Cargo.toml +++ b/crates/workspace/Cargo.toml @@ -2,6 +2,7 @@ name = "workspace" version = "0.1.0" edition = "2021" +publish = false [lib] path = "src/workspace.rs" diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 63719b7003..f2e82bd63f 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -4,6 +4,7 @@ description = "The fast, collaborative code editor." edition = "2021" name = "zed" version = "0.71.0" +publish = false [lib] name = "zed" diff --git a/script/collect-licenses.rs b/script/collect-licenses.rs deleted file mode 100755 index 2814feaa08..0000000000 --- a/script/collect-licenses.rs +++ /dev/null @@ -1,17 +0,0 @@ -//usr/bin/env rustc $0 -o a.out && ./a.out ; rm -f ./a.out ; exit - -fn main() { - println!("Hello world"); - - -} - -// Next steps: -// 1a. Add wiring in Zed to check for a licenses markdown file -// 1b. Add wiring in Zed.dev for builds to publish licenses alongside releases as well as licenses for Zed.dev itself -// (e.g. https://github.com/zed-industries/zed.dev/tree/main/content/licenses) -// 2. Figure out how to run those commands and get the license text for each MIT and Apache licensed software -// 3. Add in the configuration file: -// a. and refactor this script to have types of licenses -// b. add callback handlers for each type, -// c. check if the handler succeeds diff --git a/script/generate-licenses b/script/generate-licenses new file mode 100755 index 0000000000..31febf263f --- /dev/null +++ b/script/generate-licenses @@ -0,0 +1,10 @@ +#!/bin/bash +cargo about generate --workspace -o assets/licenses.md -c script/licenses/zed-licenses.toml script/licenses/template.hbs.md + +# cargo about automatically html-escapes all output, so we need to undo it here: +sed -i '' 's/"/"/g' assets/licenses.md +sed -i '' 's/'/'\''/g' assets/licenses.md # `'\''` ends the string, appends a single quote, and re-opens the string +sed -i '' 's/=/=/g' assets/licenses.md +sed -i '' 's/`/`/g' assets/licenses.md +sed -i '' 's/<//g' assets/licenses.md diff --git a/script/licenses/template.hbs.md b/script/licenses/template.hbs.md new file mode 100644 index 0000000000..a51b714dae --- /dev/null +++ b/script/licenses/template.hbs.md @@ -0,0 +1,27 @@ +# Third Party Licenses + +This page lists the licenses of the projects used in Zed. + +## Overview of licenses: + +{{#each overview}} +* {{name}} ({{count}}) +{{/each}} + +## All license texts: + +{{#each licenses}} + +### {{name}} + +#### Used by: + +{{#each used_by}} +* [{{crate.name}} {{crate.version}}]({{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}) +{{/each}} + +{{text}} + +-------------------------------------------------------------------------------- + +{{/each}} \ No newline at end of file diff --git a/script/licenses/zed-licenses.toml b/script/licenses/zed-licenses.toml new file mode 100644 index 0000000000..2e294878d7 --- /dev/null +++ b/script/licenses/zed-licenses.toml @@ -0,0 +1,37 @@ +no-clearly-defined = true +private = { ignore = true } +accepted = [ + "Apache-2.0", + "MIT", + "Apache-2.0 WITH LLVM-exception", + "MPL-2.0", + "BSD-3-Clause", + "BSD-2-Clause", + "ISC", + "CC0-1.0", + "Unicode-DFS-2016", + "OpenSSL", + "Zlib", +] +workarounds = [ + "ring", + "wasmtime", +] + +[procinfo.clarify] +license = "MIT" +[[procinfo.clarify.git]] +path = 'LICENSE.md' +checksum = '37db33bbbd7348969eda397b89a16f252d56c1ca7481b6ccaf56ccdcbab5dcca' + +[webpki.clarify] +license = "ISC" # It actually says 'ISC-style' but I don't know the SPDX expression for that. +[[webpki.clarify.files]] +path = 'LICENSE' +checksum = '5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a' + +[fuchsia-cprng.clarify] +license = "BSD-3-Clause" +[[fuchsia-cprng.clarify.files]] +path = 'LICENSE' +checksum = '03b114f53e6587a398931762ee11e2395bfdba252a329940e2c8c9e81813845b' \ No newline at end of file diff --git a/styles/src/themes/one-light.ts b/styles/src/themes/one-light.ts index d8c8e5272c..a5ac1f7158 100644 --- a/styles/src/themes/one-light.ts +++ b/styles/src/themes/one-light.ts @@ -11,15 +11,15 @@ const license = { export const light = createColorScheme(`${name}`, true, { neutral: chroma.scale([ - "#090a0b", - "#202227", - "#383a42", - "#696c77", - "#a0a1a7", - "#e5e5e6", - "#f0f0f1", - "#fafafa", - ]) + "#090a0b", + "#202227", + "#383a42", + "#696c77", + "#a0a1a7", + "#e5e5e6", + "#f0f0f1", + "#fafafa", + ]) .domain([0.05, 0.22, 0.25, 0.45, 0.62, 0.8, 0.9, 1]), red: colorRamp(chroma("#ca1243")), From 0f0d5d5726cae330238a545e26c7910f470373a0 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Mon, 23 Jan 2023 12:43:19 -0800 Subject: [PATCH 6/6] Added cargo-about auto-install and CI steps --- .github/workflows/ci.yml | 10 ++++++++-- .gitignore | 1 + assets/licenses.md | 1 - crates/zed/src/zed.rs | 6 ++++-- script/generate-licenses | 9 +++++++-- script/licenses/zed-licenses.toml | 2 +- 6 files changed, 21 insertions(+), 8 deletions(-) delete mode 100644 assets/licenses.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7072a3fe94..fce5717ca9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,16 +41,19 @@ jobs: with: clean: false submodules: 'recursive' - + - name: Run tests run: cargo test --workspace --no-fail-fast - + - name: Build collab run: cargo build -p collab - name: Build other binaries run: cargo build --workspace --bins --all-features + - name: Generate license file + run: script/generate-licenses + bundle: name: Bundle app runs-on: @@ -109,6 +112,9 @@ jobs: exit 1 fi + - name: Generate license file + run: script/generate-licenses + - name: Create app bundle run: script/bundle diff --git a/.gitignore b/.gitignore index 356f4d97cd..8bca2eafac 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /assets/themes/*.json /assets/themes/Internal/*.json /assets/themes/Experiments/*.json +/assets/licenses.md **/venv .build Packages diff --git a/assets/licenses.md b/assets/licenses.md deleted file mode 100644 index 5d70eab88b..0000000000 --- a/assets/licenses.md +++ /dev/null @@ -1 +0,0 @@ -Place holder \ No newline at end of file diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 30f5bef53b..53bc9d5abc 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -35,7 +35,7 @@ use search::{BufferSearchBar, ProjectSearchBar}; use serde::Deserialize; use serde_json::to_string_pretty; use settings::{keymap_file_json_schema, settings_file_json_schema, Settings}; -use std::{env, path::Path, str, sync::Arc}; +use std::{borrow::Cow, env, path::Path, str, sync::Arc}; use system_specs::SystemSpecs; use util::{channel::ReleaseChannel, paths, ResultExt}; pub use workspace; @@ -684,7 +684,9 @@ fn open_bundled_file( .with_local_workspace(&app_state, cx, |workspace, cx| { let project = workspace.project().clone(); let buffer = project.update(cx, |project, cx| { - let text = Assets::get(asset_path).unwrap().data; + let text = Assets::get(asset_path) + .map(|f| f.data) + .unwrap_or_else(|| Cow::Borrowed(b"File not found")); let text = str::from_utf8(text.as_ref()).unwrap(); project .create_buffer(text, project.languages().get_language(language), cx) diff --git a/script/generate-licenses b/script/generate-licenses index 31febf263f..e1a917292c 100755 --- a/script/generate-licenses +++ b/script/generate-licenses @@ -1,5 +1,10 @@ #!/bin/bash -cargo about generate --workspace -o assets/licenses.md -c script/licenses/zed-licenses.toml script/licenses/template.hbs.md + +set -e + +[[ "$(cargo about --version)" == "cargo-about 0.5.2" ]] || cargo install cargo-about --locked --git https://github.com/zed-industries/cargo-about --branch error-code-on-warn + +cargo about generate --fail-on-missing-license -o assets/licenses.md -c script/licenses/zed-licenses.toml script/licenses/template.hbs.md # cargo about automatically html-escapes all output, so we need to undo it here: sed -i '' 's/"/"/g' assets/licenses.md @@ -7,4 +12,4 @@ sed -i '' 's/'/'\''/g' assets/licenses.md # `'\''` ends the string, appends sed -i '' 's/=/=/g' assets/licenses.md sed -i '' 's/`/`/g' assets/licenses.md sed -i '' 's/<//g' assets/licenses.md +sed -i '' 's/>/>/g' assets/licenses.md \ No newline at end of file diff --git a/script/licenses/zed-licenses.toml b/script/licenses/zed-licenses.toml index 2e294878d7..d338e7ab0b 100644 --- a/script/licenses/zed-licenses.toml +++ b/script/licenses/zed-licenses.toml @@ -34,4 +34,4 @@ checksum = '5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a' license = "BSD-3-Clause" [[fuchsia-cprng.clarify.files]] path = 'LICENSE' -checksum = '03b114f53e6587a398931762ee11e2395bfdba252a329940e2c8c9e81813845b' \ No newline at end of file +checksum = '03b114f53e6587a398931762ee11e2395bfdba252a329940e2c8c9e81813845b'