From e75eeeee066a577fcfd62382540db4a814de922f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?griff=20=D1=96=E2=8A=99?= <346896+griffio@users.noreply.github.com> Date: Wed, 1 Oct 2025 13:22:40 +0100 Subject: [PATCH] Update SqlCoreEnvironment.kt Make localFileSystem, jarFileSystem protected as they are inherited properties in SqlDelight Unless there is some reason due to Isolation for these to be private Fix fixture tests with `file.toAbsolutePath` as the relative path breaks tests in SqlDelight --- .../com/alecstrong/sql/psi/core/SqlCoreEnvironment.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/environment/src/main/kotlin/com/alecstrong/sql/psi/core/SqlCoreEnvironment.kt b/environment/src/main/kotlin/com/alecstrong/sql/psi/core/SqlCoreEnvironment.kt index 64dbc2e3..454acd12 100644 --- a/environment/src/main/kotlin/com/alecstrong/sql/psi/core/SqlCoreEnvironment.kt +++ b/environment/src/main/kotlin/com/alecstrong/sql/psi/core/SqlCoreEnvironment.kt @@ -76,8 +76,8 @@ open class SqlCoreEnvironment( env.coreApplicationEnvironment, ) - private val localFileSystem: VirtualFileSystem = StandardFileSystems.local() - private val jarFileSystem: VirtualFileSystem = StandardFileSystems.jar() + protected val localFileSystem: VirtualFileSystem = StandardFileSystems.local() + protected val jarFileSystem: VirtualFileSystem = StandardFileSystems.jar() init { projectEnvironment.registerProjectComponent( @@ -225,7 +225,7 @@ private class CoreFileIndex( val jarFilePath = file.toUri().toString().removePrefix("jar:file://") jarFileSystem.findFileByPath(jarFilePath) } - StandardFileSystems.FILE_PROTOCOL -> localFileSystems.findFileByPath(file.pathString) + StandardFileSystems.FILE_PROTOCOL -> localFileSystems.findFileByPath(file.toAbsolutePath().toString()) else -> error("Not supported schema $schema") } ?: throw NullPointerException("File ${file.pathString} not found")