@@ -23,9 +23,7 @@ package pjrt
2323*/
2424import "C"
2525import (
26- "fmt"
2726 "os"
28- "path"
2927 "path/filepath"
3028 "regexp"
3129 "slices"
@@ -94,7 +92,7 @@ func loadNamedPlugin(name string) (*Plugin, error) {
9492 if plugin , found := loadedPlugins [name ]; found {
9593 return plugin , nil
9694 }
97- if path .IsAbs (name ) {
95+ if filepath .IsAbs (name ) {
9896 for _ , plugin := range loadedPlugins {
9997 if plugin .Path () == name {
10098 return plugin , nil
@@ -104,7 +102,7 @@ func loadNamedPlugin(name string) (*Plugin, error) {
104102
105103 // Search path to plugin -- except if name is an absolute path.
106104 pluginPath := name
107- if ! path .IsAbs (pluginPath ) {
105+ if ! filepath .IsAbs (pluginPath ) {
108106 var found bool
109107 pluginPath , found = searchPlugin (name )
110108 if ! found {
@@ -190,7 +188,6 @@ func searchPlugins(searchName string) (pluginsPaths map[string]string) {
190188 }
191189
192190 // Search for plugins in other paths.
193- fmt .Printf ("- Searching for plugin %q:\n " , searchName )
194191 for _ , pluginPath := range pluginSearchPaths {
195192 for _ , pattern := range []string {
196193 "pjrt-plugin-*.so" , "pjrt_plugin_*.so" , "pjrt_c_api_*_plugin.so" ,
@@ -202,22 +199,18 @@ func searchPlugins(searchName string) (pluginsPaths map[string]string) {
202199 }
203200 for _ , candidate := range candidates {
204201 name := pathToPluginName (candidate )
205- fmt .Printf ("\t - Evaluating plugin candidate %q: named %q\n " , candidate , name )
206202 if name == "" {
207203 continue
208204 }
209205 if searchName != "" && searchName != name {
210- fmt .Println ("\t (skipped, name doesn't match)" )
211206 continue
212207 }
213208 if _ , found := pluginsPaths [name ]; found {
214209 // We already have a plugin with that name.
215- fmt .Println ("\t (skipped, plugin already loaded with that name)" )
216210 continue
217211 }
218212 err := checkPlugin (name , candidate )
219213 if err != nil {
220- fmt .Println ("\t (skipped, plugin file didn't check)" )
221214 continue
222215 }
223216 pluginsPaths [name ] = candidate
0 commit comments