From 65318cb6acc2e36fa7231967f821fec188285f44 Mon Sep 17 00:00:00 2001 From: postsolar <120750161+postsolar@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:19:36 +0200 Subject: [PATCH] Re-enable PureScript on Linux and Windows (#8252) Relevant PRs: - https://github.com/zed-industries/zed/pull/7543 - https://github.com/zed-industries/zed/pull/7827 Release Notes: - Fixed build issues with PureScript on Windows and Linux --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- crates/zed/Cargo.toml | 4 +--- crates/zed/src/languages.rs | 5 ----- docs/src/languages/purescript.md | 2 +- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 506f8f6788..89ef40db21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10402,8 +10402,8 @@ dependencies = [ [[package]] name = "tree-sitter-purescript" -version = "1.0.0" -source = "git+https://github.com/ivanmoreau/tree-sitter-purescript?rev=a37140f0c7034977b90faa73c94fcb8a5e45ed08#a37140f0c7034977b90faa73c94fcb8a5e45ed08" +version = "0.1.0" +source = "git+https://github.com/postsolar/tree-sitter-purescript?rev=v0.1.0#0554811a512b9cec08b5a83ce9096eb22da18213" dependencies = [ "cc", "tree-sitter", diff --git a/Cargo.toml b/Cargo.toml index 457d8d9f3c..e15d0b0874 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -262,7 +262,7 @@ tree-sitter-ocaml = { git = "https://github.com/tree-sitter/tree-sitter-ocaml", tree-sitter-php = "0.21.1" tree-sitter-prisma-io = { git = "https://github.com/victorhqc/tree-sitter-prisma" } tree-sitter-proto = { git = "https://github.com/rewinfrey/tree-sitter-proto", rev = "36d54f288aee112f13a67b550ad32634d0c2cb52" } -tree-sitter-purescript = { git = "https://github.com/ivanmoreau/tree-sitter-purescript", rev = "a37140f0c7034977b90faa73c94fcb8a5e45ed08" } +tree-sitter-purescript = { git = "https://github.com/postsolar/tree-sitter-purescript", rev = "v0.1.0" } tree-sitter-python = "0.20.2" tree-sitter-racket = { git = "https://github.com/zed-industries/tree-sitter-racket", rev = "eb010cf2c674c6fd9a6316a84e28ef90190fe51a" } tree-sitter-ruby = "0.20.0" diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index dd0da9f4cf..78f8eb97fb 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -145,6 +145,7 @@ tree-sitter-ocaml.workspace = true tree-sitter-php.workspace = true tree-sitter-prisma-io.workspace = true tree-sitter-proto.workspace = true +tree-sitter-purescript.workspace = true tree-sitter-python.workspace = true tree-sitter-racket.workspace = true tree-sitter-ruby.workspace = true @@ -167,9 +168,6 @@ welcome.workspace = true workspace.workspace = true zed_actions.workspace = true -[target.'cfg(not(windows))'.dependencies] -tree-sitter-purescript.workspace = true - [dev-dependencies] call = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] } diff --git a/crates/zed/src/languages.rs b/crates/zed/src/languages.rs index 34fd7642bc..f90b31364d 100644 --- a/crates/zed/src/languages.rs +++ b/crates/zed/src/languages.rs @@ -106,7 +106,6 @@ pub fn init( ("php", tree_sitter_php::language_php()), ("prisma", tree_sitter_prisma_io::language()), ("proto", tree_sitter_proto::language()), - #[cfg(not(any(target_os = "linux", target_os = "windows")))] ("purescript", tree_sitter_purescript::language()), ("python", tree_sitter_python::language()), ("racket", tree_sitter_racket::language()), @@ -294,10 +293,6 @@ pub fn init( Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())), ], ); - - // Produces a link error on linux due to duplicated `state_new` symbol - // todo!(linux): Restore purescript - #[cfg(not(target_os = "linux"))] language( "purescript", vec![Arc::new(purescript::PurescriptLspAdapter::new( diff --git a/docs/src/languages/purescript.md b/docs/src/languages/purescript.md index d534f861ac..1c46886e58 100644 --- a/docs/src/languages/purescript.md +++ b/docs/src/languages/purescript.md @@ -1,4 +1,4 @@ # PureScript -- Tree Sitter: [tree-sitter-purescript](https://github.com/ivanmoreau/tree-sitter-purescript) +- Tree Sitter: [tree-sitter-purescript](https://github.com/postsolar/tree-sitter-purescript) - Language Server: [purescript](https://github.com/nwolverson/purescript-language-server)