-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split capability retrieval from initialize (#2831)
Co-authored-by: Bas Zalmstra <bas@prefix.dev> Co-authored-by: Pavel Zwerschke <pavelzw@gmail.com> Co-authored-by: Ruben Arts <ruben.arts@hotmail.com> Co-authored-by: nichmor <nmorkotilo@gmail.com>
- Loading branch information
1 parent
bc79dc3
commit 13121ba
Showing
7 changed files
with
59 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod conda_build; | ||
pub mod conda_metadata; | ||
pub mod initialize; | ||
pub mod negotiate_capabilities; |
22 changes: 22 additions & 0 deletions
22
crates/pixi_build_types/src/procedures/negotiate_capabilities.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::capabilities::{BackendCapabilities, FrontendCapabilities}; | ||
|
||
pub const METHOD_NAME: &str = "negotiateCapabilities"; | ||
|
||
/// Negotiate the capabilities between the frontend and the backend. | ||
/// after which we know what the backend can do and what the frontend can do. | ||
#[derive(Debug, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct NegotiateCapabilitiesParams { | ||
/// The capabilities that the frontend provides. | ||
pub capabilities: FrontendCapabilities, | ||
} | ||
|
||
/// The result of the initialize request. | ||
#[derive(Debug, Serialize, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct NegotiateCapabilitiesResult { | ||
/// The capabilities that the backend provides. | ||
pub capabilities: BackendCapabilities, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters