-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
language serverIssues related to Regal's language serverIssues related to Regal's language serverperformancePerformance related issues or improvementsPerformance related issues or improvements
Description
When calling the handlers implemented in Rego, we provide a lot of metadata from the context:
"regal": {
"client": {
"capabilities": {},
"identifier": 1,
"init_options": {
"enableDebugCodelens": true,
"evalCodelensDisplayInline": true,
"formatter": "opa-fmt"
}
},
"environment": {
"path_separator": "/",
"web_server_base_uri": "http://127.0.0.1:5052",
"workspace_root_path": "/Users/foo/git/opa/regal",
"workspace_root_uri": "file:///Users/foo/git/opa/regal"
},
"file": {
"abs": "",
"content": "",
"lines": [],
"name": "",
"parse_errors": [],
"rego_version": "unknown",
"successful_parse_count": 0,
"uri": ""
}
}Which is often needed too. But things like the workspace root or the client init option does not change from one request to the other. So we should move this data from input and into the store and have it available somewhere under data instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
language serverIssues related to Regal's language serverIssues related to Regal's language serverperformancePerformance related issues or improvementsPerformance related issues or improvements