Skip to content

Commit

Permalink
Used Delayed error style for buck-check command
Browse files Browse the repository at this point in the history
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
  • Loading branch information
grievejia authored and facebook-github-bot committed Dec 13, 2024
1 parent 88a279b commit da08d1b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pyre2/pyre2/bin/module/source_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down

0 comments on commit da08d1b

Please sign in to comment.