extension/dap: Add resolve_tcp_template function (#31010)

Extensions cannot look up available port themselves, hence the new API.
With this I'm able to port our Ruby implementation into an extension.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-05-20 15:17:13 +02:00 committed by GitHub
parent e4262f97af
commit e5670ba081
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 48 additions and 24 deletions

View file

@ -54,10 +54,6 @@ impl DapRegistry {
pub fn add_adapter(&self, adapter: Arc<dyn DebugAdapter>) {
let name = adapter.name();
let _previous_value = self.0.write().adapters.insert(name, adapter);
debug_assert!(
_previous_value.is_none(),
"Attempted to insert a new debug adapter when one is already registered"
);
}
pub fn adapter_language(&self, adapter_name: &str) -> Option<LanguageName> {