mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 03:54:42 +00:00 
			
		
		
		
	Merge pull request #19888 from Veykril/push-wylsryzpnnop
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				metrics / build_metrics (push) Waiting to run
				
			
		
			
				
	
				metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (self) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / generate_final_metrics (push) Blocked by required conditions
				
			
		
			
				
	
				rustdoc / rustdoc (push) Waiting to run
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	metrics / build_metrics (push) Waiting to run
				
			metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
				
			metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
				
			metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
				
			metrics / other_metrics (self) (push) Blocked by required conditions
				
			metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
				
			metrics / generate_final_metrics (push) Blocked by required conditions
				
			rustdoc / rustdoc (push) Waiting to run
				
			fix: Recognize salsa cycles in `thread_result_to_response`
This commit is contained in:
		
						commit
						cd413d0cac
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -6,7 +6,7 @@ use std::{ | |||
| 
 | ||||
| use ide_db::base_db::{ | ||||
|     DbPanicContext, | ||||
|     salsa::{self, Cancelled}, | ||||
|     salsa::{self, Cancelled, UnexpectedCycle}, | ||||
| }; | ||||
| use lsp_server::{ExtractError, Response, ResponseError}; | ||||
| use serde::{Serialize, de::DeserializeOwned}; | ||||
|  | @ -349,11 +349,14 @@ where | |||
|             let mut message = "request handler panicked".to_owned(); | ||||
|             if let Some(panic_message) = panic_message { | ||||
|                 message.push_str(": "); | ||||
|                 message.push_str(panic_message) | ||||
|                 message.push_str(panic_message); | ||||
|             } else if let Some(cycle) = panic.downcast_ref::<UnexpectedCycle>() { | ||||
|                 tracing::error!("{cycle}"); | ||||
|                 message.push_str(": unexpected cycle"); | ||||
|             } else if let Ok(cancelled) = panic.downcast::<Cancelled>() { | ||||
|                 tracing::error!("Cancellation propagated out of salsa! This is a bug"); | ||||
|                 return Err(HandlerCancelledError::Inner(*cancelled)); | ||||
|             } | ||||
|             }; | ||||
| 
 | ||||
|             Ok(lsp_server::Response::new_err( | ||||
|                 id, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Wirth
						Lukas Wirth