-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server failed to start probably due to hard-coded installation path ERROR #579
Comments
Looks like your package xsef defined a symbol that requires |
Thanks for your time looking into it. Yes, it is indeed. There is one R file in my xsef package which have this line in it: Actually the xsef package depends on the XML package (which have the xmlTreeParse function), but installing and using it independently have no problem for me (since XML is loaded alongside with xsef, maybe??). Not sure how it affects the languageserver's failure to start. Maybe languageserver cannot handle this situation. My findings so far is that:
Thanks for your help! |
When the error occurs, is XML properly installed? Does Looks like xsef cannot be loaded in your case. I create a package that defines the following but if I remove XML, the error from package loading, not from
|
getNamespace("xsef")$.xschema gives me the same error - Error: could not find function "xmlTreeParse" But, if I just type R and require(xsef), no issues. And, head(.xschema) in R terminal works fine as well. |
Is there a solution or workaround to this issue? I tried lazy late loading and use XML:::xmlTreePase, both did not work. Is it possible that the languageserver just pass through without error out in such scenario? |
Would you like to try #582 and see if it works for you? |
Think the original cause is hard-coded installation path which can be solved by using '--no-staged-install'. Tried #582, it works now! Thx a lot. |
The language server fails to start because it tries to parse an xml file in one of my R package (called xsef) and cannot find xmlTreeParse function.
I am using vscode (v1.72.2), R plugin for vscode (v2.6.0), R (v4.0.3), languageserver (v0.3.13).
The error message is like:
[2022-10-15 12:09:05:322] Error: could not find function "xmlTreeParse"
Call: xmlTreeParse(system.file("extdata/xschema.xml", package="xsef"))
Stack trace:
1: get(x, envir = ns)
2: FUN(X[[i]], ...)
3: vapply(private$objects, function(x) {
is.function(get(x, envir = ns))
}, logical(1L), USE.NAMES = FALSE)
4: initialize(...)
5: PackageNamespace$new(pkgname)
6: self$get_namespace(pkgname)
7: self$load_package(package)
8: self$workspace$load_packages(packages)
9: resolve_callack(self, uri, version, result)
10: private$callback(result)
11: task$check()
12: self$resolve_task_manager$check_tasks()
13: self$process_events()
[2022-10-15 12:09:05:322] exiting
Thanks for your help!
The text was updated successfully, but these errors were encountered: