From da08d1bc991c63c28994356daeb40c8870c5452a Mon Sep 17 00:00:00 2001 From: Jia Chen Date: Thu, 12 Dec 2024 23:16:09 -0800 Subject: [PATCH] Used `Delayed` error style for `buck-check` command Summary: confusionanddelay The `pyre2 buck-check` command dumps its result into a JSON file for downstream to consume. What the command does on the console is pretty much invisible to most users given that the command gets invoked by Buck2 which always hide process stderr unless it fails. So dumping the error immediately is probably not that relevant for end users. Reviewed By: samwgoldman Differential Revision: D67177248 fbshipit-source-id: ac74f6cf349d8e0a82e1f9215ac63d1e7bf15265 --- pyre2/pyre2/bin/module/source_db.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyre2/pyre2/bin/module/source_db.rs b/pyre2/pyre2/bin/module/source_db.rs index e6d4bd169ee..df364ea6479 100644 --- a/pyre2/pyre2/bin/module/source_db.rs +++ b/pyre2/pyre2/bin/module/source_db.rs @@ -155,9 +155,7 @@ impl BuckSourceDatabase { pub fn load(&self, name: ModuleName) -> (LoadResult, ErrorStyle) { match self.lookup(name) { - LookupResult::OwningSource(path) => { - (LoadResult::from_path(path), ErrorStyle::Immediate) - } + LookupResult::OwningSource(path) => (LoadResult::from_path(path), ErrorStyle::Delayed), LookupResult::ExternalSource(path) => (LoadResult::from_path(path), ErrorStyle::Never), LookupResult::NoSource => ( LoadResult::FailedToFind(anyhow!("Not a dependency or typeshed")),