Skip to content

Commit 7f6a932

Browse files
committed
fix: merge main
2 parents fbe503e + 680689c commit 7f6a932

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1805
-4129
lines changed

Cargo.lock

+12-108
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ pg_inlay_hints = { path = "./crates/pg_inlay_hints", version = "0.0.0
6565
pg_lexer = { path = "./crates/pg_lexer", version = "0.0.0" }
6666
pg_lexer_codegen = { path = "./crates/pg_lexer_codegen", version = "0.0.0" }
6767
pg_lint = { path = "./crates/pg_lint", version = "0.0.0" }
68+
pg_lsp = { path = "./crates/pg_lsp", version = "0.0.0" }
6869
pg_lsp_converters = { path = "./crates/pg_lsp_converters", version = "0.0.0" }
69-
pg_lsp_new = { path = "./crates/pg_lsp_new", version = "0.0.0" }
7070
pg_markup = { path = "./crates/pg_markup", version = "0.0.0" }
7171
pg_query_ext = { path = "./crates/pg_query_ext", version = "0.0.0" }
7272
pg_query_ext_codegen = { path = "./crates/pg_query_ext_codegen", version = "0.0.0" }
@@ -79,7 +79,6 @@ pg_treesitter_queries = { path = "./crates/pg_treesitter_queries", version =
7979
pg_type_resolver = { path = "./crates/pg_type_resolver", version = "0.0.0" }
8080
pg_typecheck = { path = "./crates/pg_typecheck", version = "0.0.0" }
8181
pg_workspace = { path = "./crates/pg_workspace", version = "0.0.0" }
82-
pg_workspace_new = { path = "./crates/pg_workspace_new", version = "0.0.0" }
8382

8483
pg_test_utils = { path = "./crates/pg_test_utils" }
8584
# parser = { path = "./crates/parser", version = "0.0.0" }

crates/pg_cli/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ pg_console = { workspace = true }
2424
pg_diagnostics = { workspace = true }
2525
pg_flags = { workspace = true }
2626
pg_fs = { workspace = true }
27-
pg_lsp_new = { workspace = true }
27+
pg_lsp = { workspace = true }
2828
pg_text_edit = { workspace = true }
29-
pg_workspace_new = { workspace = true }
29+
pg_workspace = { workspace = true }
3030
quick-junit = "0.5.0"
3131
rayon = { workspace = true }
3232
rustc-hash = { workspace = true }

crates/pg_cli/src/changed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::CliDiagnostic;
22
use pg_configuration::PartialConfiguration;
33
use pg_fs::FileSystem;
4-
use pg_workspace_new::DynRef;
4+
use pg_workspace::DynRef;
55
use std::ffi::OsString;
66

77
pub(crate) fn get_changed_files(

crates/pg_cli/src/cli_options.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct CliOptions {
2222
#[bpaf(long("verbose"), switch, fallback(false))]
2323
pub verbose: bool,
2424

25-
/// Set the file path to the configuration file, or the directory path to find `biome.json` or `biome.jsonc`.
25+
/// Set the file path to the configuration file, or the directory path to find `pglsp.toml`.
2626
/// If used, it disables the default configuration file resolution.
2727
#[bpaf(long("config-path"), argument("PATH"), optional)]
2828
pub config_path: Option<String>,
@@ -44,7 +44,7 @@ pub struct CliOptions {
4444
#[bpaf(long("no-errors-on-unmatched"), switch)]
4545
pub no_errors_on_unmatched: bool,
4646

47-
/// Tell Biome to exit with an error code if some diagnostics emit warnings.
47+
/// Tell PGLSP to exit with an error code if some diagnostics emit warnings.
4848
#[bpaf(long("error-on-warnings"), switch)]
4949
pub error_on_warnings: bool,
5050

@@ -82,7 +82,7 @@ pub struct CliOptions {
8282
fallback(Severity::default()),
8383
display_fallback
8484
)]
85-
/// The level of diagnostics to show. In order, from the lowest to the most important: info, warn, error. Passing `--diagnostic-level=error` will cause Biome to print only diagnostics that contain only errors.
85+
/// The level of diagnostics to show. In order, from the lowest to the most important: info, warn, error. Passing `--diagnostic-level=error` will cause PGLSP to print only diagnostics that contain only errors.
8686
pub diagnostic_level: Severity,
8787
}
8888

crates/pg_cli/src/commands/check.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
// use super::{determine_fix_file_mode, FixFileModeOptions, LoadEditorConfig};
21
use crate::cli_options::CliOptions;
3-
// use crate::commands::{get_files_to_process_with_cli_options, CommandRunner};
42
use crate::{CliDiagnostic, Execution, TraversalMode};
53
use pg_configuration::PartialConfiguration;
64
use pg_console::Console;
7-
// use biome_deserialize::Merge;
85
use pg_fs::FileSystem;
9-
use pg_workspace_new::{configuration::LoadedConfiguration, DynRef, Workspace, WorkspaceError};
6+
use pg_workspace::{configuration::LoadedConfiguration, DynRef, Workspace, WorkspaceError};
107
use std::ffi::OsString;
118

129
use super::{get_files_to_process_with_cli_options, CommandRunner};

crates/pg_cli/src/commands/daemon.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use crate::{
44
CliDiagnostic, CliSession,
55
};
66
use pg_console::{markup, ConsoleExt};
7-
use pg_lsp_new::ServerFactory;
8-
use pg_workspace_new::{workspace::WorkspaceClient, TransportError, WorkspaceError};
7+
use pg_lsp::ServerFactory;
8+
use pg_workspace::{workspace::WorkspaceClient, TransportError, WorkspaceError};
99
use std::{env, fs, path::PathBuf};
1010
use tokio::io;
1111
use tokio::runtime::Runtime;
@@ -176,9 +176,9 @@ pub(crate) fn read_most_recent_log_file(
176176
log_path: Option<PathBuf>,
177177
log_file_name_prefix: String,
178178
) -> io::Result<Option<String>> {
179-
let biome_log_path = log_path.unwrap_or(default_pglsp_log_path());
179+
let pglsp_log_path = log_path.unwrap_or(default_pglsp_log_path());
180180

181-
let most_recent = fs::read_dir(biome_log_path)?
181+
let most_recent = fs::read_dir(pglsp_log_path)?
182182
.flatten()
183183
.filter(|file| file.file_type().is_ok_and(|ty| ty.is_file()))
184184
.filter_map(|file| {
@@ -238,7 +238,7 @@ pub fn default_pglsp_log_path() -> PathBuf {
238238

239239
/// Tracing filter enabling:
240240
/// - All spans and events at level info or higher
241-
/// - All spans and events at level debug in crates whose name starts with `biome`
241+
/// - All spans and events at level debug in crates whose name starts with `pglsp`
242242
struct LoggingFilter;
243243

244244
/// Tracing filter used for spans emitted by `pglsp*` crates

crates/pg_cli/src/commands/init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::{CliDiagnostic, CliSession};
22
use pg_configuration::PartialConfiguration;
33
use pg_console::{markup, ConsoleExt};
44
use pg_fs::ConfigName;
5-
use pg_workspace_new::configuration::create_config;
5+
use pg_workspace::configuration::create_config;
66

77
pub(crate) fn init(mut session: CliSession) -> Result<(), CliDiagnostic> {
88
let fs = &mut session.app.fs;

crates/pg_cli/src/commands/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use bpaf::Bpaf;
99
use pg_configuration::{partial_configuration, PartialConfiguration};
1010
use pg_console::Console;
1111
use pg_fs::FileSystem;
12-
use pg_workspace_new::configuration::{load_configuration, LoadedConfiguration};
13-
use pg_workspace_new::settings::PartialConfigurationExt;
14-
use pg_workspace_new::workspace::{FixFileMode, UpdateSettingsParams};
15-
use pg_workspace_new::{DynRef, Workspace, WorkspaceError};
12+
use pg_workspace::configuration::{load_configuration, LoadedConfiguration};
13+
use pg_workspace::settings::PartialConfigurationExt;
14+
use pg_workspace::workspace::{FixFileMode, UpdateSettingsParams};
15+
use pg_workspace::{DynRef, Workspace, WorkspaceError};
1616
use std::ffi::OsString;
1717
use std::path::PathBuf;
1818

crates/pg_cli/src/commands/version.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use pg_console::fmt::Formatter;
22
use pg_console::{fmt, markup, ConsoleExt};
3-
use pg_workspace_new::workspace::ServerInfo;
3+
use pg_workspace::workspace::ServerInfo;
44

55
use crate::{CliDiagnostic, CliSession, VERSION};
66

crates/pg_cli/src/diagnostics.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ use pg_diagnostics::adapters::{BpafError, IoError, SerdeJsonError};
44
use pg_diagnostics::{
55
Advices, Category, Diagnostic, Error, LogCategory, MessageAndDescription, Severity, Visit,
66
};
7-
use pg_workspace_new::WorkspaceError;
7+
use pg_workspace::WorkspaceError;
88
use std::process::{ExitCode, Termination};
99
use std::{env::current_exe, fmt::Debug};
1010

1111
fn command_name() -> String {
1212
current_exe()
1313
.ok()
1414
.and_then(|path| Some(path.file_name()?.to_str()?.to_string()))
15-
.unwrap_or_else(|| String::from("biome"))
15+
.unwrap_or_else(|| String::from("pglsp"))
1616
}
1717

18-
/// A diagnostic that is emitted when running biome via CLI.
18+
/// A diagnostic that is emitted when running PGLSP via CLI.
1919
///
2020
/// When displaying the diagnostic,
2121
#[derive(Debug, Diagnostic)]
@@ -42,13 +42,13 @@ pub enum CliDiagnostic {
4242
FileCheck(FileCheck),
4343
/// When an argument is higher than the expected maximum
4444
OverflowNumberArgument(OverflowNumberArgument),
45-
/// Wrapper for an underlying `biome_service` error
45+
/// Wrapper for an underlying pglsp-service error
4646
WorkspaceError(WorkspaceError),
4747
/// Wrapper for an underlying `std::io` error
4848
IoError(IoDiagnostic),
4949
/// The daemon is not running
5050
ServerNotRunning(ServerNotRunning),
51-
/// The end configuration (`biome.json` + other options) is incompatible with the command
51+
/// The end configuration (`pglsp.toml` + other options) is incompatible with the command
5252
IncompatibleEndConfiguration(IncompatibleEndConfiguration),
5353
/// No files processed during the file system traversal
5454
NoFilesWereProcessed(NoFilesWereProcessed),
@@ -410,7 +410,7 @@ impl CliDiagnostic {
410410
Self::ServerNotRunning(ServerNotRunning)
411411
}
412412

413-
/// Emitted when the end configuration (`biome.json` file + CLI arguments + LSP configuration)
413+
/// Emitted when the end configuration (`pglsp.toml` file + CLI arguments + LSP configuration)
414414
/// results in a combination of options that doesn't allow to run the command correctly.
415415
///
416416
/// A reason needs to be provided

0 commit comments

Comments
 (0)