mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-03 17:58:17 +00:00
feat: clean up log and watch lints (#1659)
This commit is contained in:
parent
92c5e40abd
commit
4d13734fed
4 changed files with 10 additions and 6 deletions
|
@ -16,7 +16,7 @@ pub(crate) fn var_docs(ctx: &mut LocalContext, pos: Span) -> Option<VarDocs> {
|
|||
// Must use raw result as type aliases contain the source information.
|
||||
let mut srcs = ty.sources();
|
||||
srcs.sort();
|
||||
log::info!("check variable docs of ty: {ty:?} => {srcs:?}");
|
||||
log::debug!("check variable docs of ty: {ty:?} => {srcs:?}");
|
||||
let doc_source = srcs.into_iter().next()?;
|
||||
|
||||
// todo people can easily forget to simplify the type which is not good. we
|
||||
|
|
|
@ -228,11 +228,11 @@ impl<M: PathAccessModel + Clone + Sized> Vfs<M> {
|
|||
let mut m = self.managed.lock();
|
||||
for id in file_ids {
|
||||
let Some(entry) = m.entries.get_mut(id) else {
|
||||
log::info!("Vfs(dirty, {id:?}): file id not found");
|
||||
log::debug!("Vfs(dirty, {id:?}): file id not found");
|
||||
return false;
|
||||
};
|
||||
if entry.changed_at > rev {
|
||||
log::info!("Vfs(dirty, {id:?}): rev {rev:?} => {:?}", entry.changed_at);
|
||||
log::debug!("Vfs(dirty, {id:?}): rev {rev:?} => {:?}", entry.changed_at);
|
||||
return false;
|
||||
}
|
||||
log::debug!(
|
||||
|
|
|
@ -447,6 +447,10 @@ impl CompileHandlerImpl {
|
|||
.signal
|
||||
.should_run_task_dyn(self.analysis.lint, art.doc.as_ref())
|
||||
.unwrap_or_default();
|
||||
log::info!(
|
||||
"Project: should_lint: {should_lint:?}, signal: {:?}",
|
||||
art.snap.signal
|
||||
);
|
||||
|
||||
if !should_lint {
|
||||
let enc = self.analysis.position_encoding;
|
||||
|
@ -646,7 +650,7 @@ impl CompileHandler<LspCompilerFeat, ProjectInsStateExt> for CompileHandlerImpl
|
|||
let art = art.clone();
|
||||
inner.notify_compile(Arc::new(crate::tool::preview::PreviewCompileView { art }));
|
||||
} else {
|
||||
log::info!("Project: no preview for {:?}", art.id());
|
||||
log::debug!("Project: no preview for {:?}", art.id());
|
||||
}
|
||||
|
||||
self.notify_diagnostics(art);
|
||||
|
|
|
@ -157,7 +157,7 @@ impl ExportTask {
|
|||
static EXPORT_ID: AtomicUsize = AtomicUsize::new(0);
|
||||
let export_id = EXPORT_ID.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
|
||||
|
||||
log::info!("ExportTask({export_id}): exporting {entry:?} to {write_to:?}");
|
||||
log::debug!("ExportTask({export_id}): exporting {entry:?} to {write_to:?}");
|
||||
if let Some(e) = write_to.parent() {
|
||||
if !e.exists() {
|
||||
std::fs::create_dir_all(e).context("failed to create directory")?;
|
||||
|
@ -317,7 +317,7 @@ impl ExportTask {
|
|||
.await
|
||||
.context_ut("failed to export")??;
|
||||
|
||||
log::info!("ExportTask({export_id}): export complete");
|
||||
log::debug!("ExportTask({export_id}): export complete");
|
||||
Ok(Some(write_to))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue