mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 02:08:17 +00:00
feat: replace diag_group id with project_id (#1224)
This commit is contained in:
parent
0f588c99d7
commit
7647d807ec
7 changed files with 88 additions and 87 deletions
|
@ -33,6 +33,17 @@ pub type LspInterrupt = Interrupt<LspCompilerFeat>;
|
|||
#[derive(Debug, Clone, Default, PartialEq, Eq, Hash)]
|
||||
pub struct ProjectInsId(EcoString);
|
||||
|
||||
impl fmt::Display for ProjectInsId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{:?}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl ProjectInsId {
|
||||
/// The primary project id.
|
||||
pub const PRIMARY: ProjectInsId = ProjectInsId(EcoString::inline("primary"));
|
||||
}
|
||||
|
||||
/// A signal that possibly triggers an export.
|
||||
///
|
||||
/// Whether to export depends on the current state of the document and the user
|
||||
|
@ -142,6 +153,13 @@ pub struct CompiledArtifact<F: CompilerFeat> {
|
|||
pub deps: OnceLock<EcoVec<FileId>>,
|
||||
}
|
||||
|
||||
impl fmt::Display for CompiledArtifact<LspCompilerFeat> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let rev = self.world.revision();
|
||||
write!(f, "CompiledArtifact({:?}, rev={rev:?})", self.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl<F: CompilerFeat> std::ops::Deref for CompiledArtifact<F> {
|
||||
type Target = CompileSnapshot<F>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue