File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -893,18 +893,18 @@ function analyze_and_report_package!(interp::ConcreteInterpreter,
893893end
894894
895895function find_pkg (pkgname:: AbstractString )
896- pkgenv = Base. identify_package_env (pkgname)
896+ pkgenv = @lock Base . require_lock Base. identify_package_env (pkgname)
897897 isnothing (pkgenv) && error (lazy " Unknown package $pkgname." )
898898 pkgid, env = pkgenv
899- filename = Base. locate_package (pkgid, env)
899+ filename = @lock Base . require_lock Base. locate_package (pkgid, env)
900900 isnothing (filename) && error (lazy " Expected $pkgname to have a source file." )
901901 return (; pkgid, filename)
902902end
903903
904904function find_pkg (pkgmod:: Module )
905905 filename = pathof (pkgmod)
906906 isnothing (filename) && error (lazy " Cannot analyze a module defined in the REPL." )
907- pkgid = Base. identify_package (String (nameof (pkgmod)))
907+ pkgid = @lock Base . require_lock Base. identify_package (String (nameof (pkgmod)))
908908 isnothing (pkgid) && error (lazy " Expected $pkgmod to exist as a package." )
909909 return (; pkgid, filename)
910910end
You can’t perform that action at this time.
0 commit comments