profile
viewpoint
Remy Suen rcjsuen Numerator Ottawa, Ontario, Canada senior software developer at Numerator, @eclipse committer, language server protocol enthusiast, author and maintainer of the Dockerfile language server

rcjsuen/dockerfile-language-server-nodejs 135

A language server for Dockerfiles powered by Node.js, TypeScript, and VSCode technologies.

rcjsuen/dockerfile-utils 11

A library and command line interface for formatting and linting Dockerfiles.

rcjsuen/dockerfile-language-service 9

Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.

rcjsuen/dockerfile-ast 6

An npm module for parsing Dockerfiles powered by TypeScript.

rcjsuen/ionic-conference-app 1

A conference app built with Ionic to demonstrate Ionic

rcjsuen/aether 0

Aether is a typing game built on top of the Phaser game framework.

rcjsuen/airflow 0

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

rcjsuen/bash-language-server 0

A language server for Bash

rcjsuen/charts 0

Curated applications for Kubernetes

issue commentmicrosoft/language-server-protocol

Is it possible to specify parameters for command provided by the server ?

@OGMichel You might want to ask in the microsoft/vscode-languageserver-node repository if you're having issues integrating with Visual Studio Code.

OGMichel

comment created time in a day

issue commentmoby/moby

Difference in behaviour between whitespace in front of comments and whitespace in front of empty escaped newlines

I opened docker/cli#2617 to improve the documentation; feel free to comment on that PR if you have suggestions 👍

It looks okay to me. Thank you for fleshing this out in the documentation, @thaJeztah!

rcjsuen

comment created time in 2 days

issue closedrcjsuen/dockerfile-ast

Exception thrown with escaped whitespace and newlines between arguments

#escape=`
FROM alpine
COPY a b `
` 
c

Run the following code with RunKit.

let dockerfileAst = require("dockerfile-ast")
let dockerfile = dockerfileAst.DockerfileParser.parse("#escape=`\nFROM alpine\nCOPY a b `\n` \nc");
let instruction = dockerfile.getInstructions()[1];
instruction.getArgumentsRanges();
Error: Range#create called with invalid arguments[null, [object Object], undefined, undefined]
at Object.create in vscode-languageserver-types/lib/umd/main.js — line 54

at Copy.getArgumentsRanges in dockerfile-ast/lib/instruction.js — line 82
 in this notebook — line 4
at Module._compile in core internal/modules/cjs/loader.js — line 1200
at Module._extensions..js in core internal/modules/cjs/loader.js — line 1220
at Module.load in core internal/modules/cjs/loader.js — line 1049
at Module._load in core internal/modules/cjs/loader.js — line 937
at Function.executeUserEntryPoint (as runMain) in core internal/modules/run_main.js — line 71
 in core internal/main/run_main_module.js — line 17

closed time in 3 days

rcjsuen

issue commentrcjsuen/dockerfile-ast

Exception thrown with escaped whitespace and newlines between arguments

Fixed by d3025267fca318b190bcba4735129555f28c64be.

rcjsuen

comment created time in 3 days

push eventrcjsuen/dockerfile-ast

Remy Suen

commit sha d3025267fca318b190bcba4735129555f28c64be

Handle whitespace after escape characters better Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 3 days

issue commentmicrosoft/vscode-docker

Request textDocument/semanticTokens failed

@JoseFMP Would you mind sharing your Dockerfile here so we can ensure that your bug is covered?

csakaszamok

comment created time in 6 days

issue commentmicrosoft/vscode-docker

Request textDocument/semanticTokens failed

Still happening over here.

Hi, @JoseFMP. You are correct. The bug fix is not in a release yet so you will continue to encounter this issue until then. Thank you for your understanding.

csakaszamok

comment created time in 6 days

release rcjsuen/dockerfile-language-server-nodejs

v0.0.24

released time in 11 days

issue commentmicrosoft/language-server-protocol

Provide range or bias direction for go-to-definition etc

But offset 0 means the first character in any 0-based offset system i've ever seen.

@puremourning In this case the character does not matter because Position is referring to the space between two characters (or in the extreme case, the start of the line or the end of the line excluding newline characters).

Or perhaps I'm misinterpreting something here?

sam-mccall

comment created time in 11 days

issue commentmoby/moby

Difference in behaviour between whitespace in front of comments and whitespace in front of empty escaped newlines

Note that officially comments must be at the start of a line, so should not have leading whitespace; some versions of Docker accepted white-space before it, and that behaviour is kept to not break existing Dockerfiles (some discussion on #34333, #34333 (comment) and probably some other ones).

Thank you for sharing this little important detail, @thaJeztah. It sounds to me then that there is nothing that can/will be done here given that backwards compatibility must be preserved. So unless some sort of versioning is introduced to the Dockerfile syntax, this behaviour must remain.

rcjsuen

comment created time in 11 days

issue commentmicrosoft/language-server-protocol

Provide range or bias direction for go-to-definition etc

Also see https://github.com/microsoft/vscode-languageserver-node/issues/593.

sam-mccall

comment created time in 12 days

issue commentmicrosoft/vscode-languageserver-node

Accessing registered language providers

I found DocumentSymbolRequest.method is not one of them exposed. Is there any reason it is omitted?

@hyangah It looks like it's there or am I looking at the wrong thing?

https://github.com/microsoft/vscode-languageserver-node/blob/d2a3322666101a3c246369f4098d430adc18f2d5/protocol/src/common/protocol.ts#L2107-L2108

hyangah

comment created time in 12 days

PR closed apache/airflow

Protect /rendered page from invalid DAG ids (#8171) area:Webserver stale

Redirects the user back to the main page if an invalid DAG id is provided to the /rendered page instead of crashing to improve the overall user experience.

This looks at one of the routes mentioned by #8171.



In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed. In case of a new dependency, check compliance with the ASF 3rd Party License Policy. In case of backwards incompatible changes please leave a note in UPDATING.md. Read the Pull Request Guidelines for more information.

+19 -2

14 comments

2 changed files

rcjsuen

pr closed time in 13 days

pull request commentapache/airflow

Protect /rendered page from invalid DAG ids (#8171)

Not able to invest the time this change needs and it looks like @2796gaurav may be looking at this based on https://github.com/apache/airflow/issues/8171#issuecomment-640240071.

rcjsuen

comment created time in 13 days

issue commentmicrosoft/vscode-languageserver-node

Accessing registered language providers

@hyangah Perhaps you can use a middleware to get a reference to the provider and then you can call it whenever you feel like to get symbol information?

hyangah

comment created time in 13 days

issue closedrcjsuen/dockerfile-language-server-nodejs

The server does not launch.

I checked out the code and ran all the necessary build and installs on a linux (ubuntu 19.04) machine. Ran the following command to launch the server.

docker-langserver --socket=3000

The moment I run the above command, the server just exits on its own.

> tsc --version
Version 3.9.5
> node --version
v12.16.3

closed time in 15 days

cotigao

issue commentrcjsuen/dockerfile-language-server-nodejs

The server does not launch.

We can close this issue. Thanks for the prompt respone.

No problem. Happy to help.

cotigao

comment created time in 15 days

issue commentmoby/moby

Difference in behaviour between whitespace in front of comments and whitespace in front of empty escaped newlines

There is a comment in BuildKit that points out the oddity of preserving whitespace on continuation lines. So while it seems this is intentional, it's not clear if anyone remembers the reason. 🤔

rcjsuen

comment created time in 15 days

issue commentrcjsuen/dockerfile-language-server-nodejs

The server does not launch.

@cotigao See https://github.com/microsoft/vscode-languageserver-node/issues/245#issuecomment-336054699.

cotigao

comment created time in 15 days

issue openedrcjsuen/dockerfile-ast

Exception thrown with escaped whitespace and newlines between arguments

#escape=`
FROM alpine
COPY a b `
` 
c

Run the following code with RunKit.

let dockerfileAst = require("dockerfile-ast")
let dockerfile = dockerfileAst.DockerfileParser.parse("#escape=`\nFROM alpine\nCOPY a b `\n` \nc");
let instruction = dockerfile.getInstructions()[1];
instruction.getArgumentsRanges();
Error: Range#create called with invalid arguments[null, [object Object], undefined, undefined]
at Object.create in vscode-languageserver-types/lib/umd/main.js — line 54

at Copy.getArgumentsRanges in dockerfile-ast/lib/instruction.js — line 82
 in this notebook — line 4
at Module._compile in core internal/modules/cjs/loader.js — line 1200
at Module._extensions..js in core internal/modules/cjs/loader.js — line 1220
at Module.load in core internal/modules/cjs/loader.js — line 1049
at Module._load in core internal/modules/cjs/loader.js — line 937
at Function.executeUserEntryPoint (as runMain) in core internal/modules/run_main.js — line 71
 in core internal/main/run_main_module.js — line 17

created time in 16 days

push eventrcjsuen/dockerfile-utils

Remy Suen

commit sha 2f598deee6dd27a9a5b55410fb4502604a9fb2de

Fix #78 ARG or ENV instructions with only a comment are disallowed If an ARG or ENV instruction that spans multiple lines but only has comments will now be correctly flagged as missing arguments. Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 16 days

issue closedrcjsuen/dockerfile-utils

ARG and ENV instruction that spans multiple lines and only has a comment is not flagged as an error

This Dockerfile should produce a linting error.

FROM scratch
ENV \
    # comment
$ docker build .
Sending build context to Docker daemon  46.79MB
Error response from daemon: Dockerfile parse error line 2: ENV requires at least one argument

closed time in 16 days

rcjsuen

push eventrcjsuen/dockerfile-utils

Remy Suen

commit sha d1ffeccd6165a1e0784c9e84db3fb763cb3a523c

Fix #77 Correct linting error ranges of multiline arguments Arguments that are flagged as being invalid but have parts of its content preceded by an escape character will no longer have their ranges calculated incorrectly in linting errors. Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 16 days

issue closedrcjsuen/dockerfile-utils

Multiline argument with a character preceded by the escape character causes linting range to be off

FROM alpine
COPY a b /di\
\
\r
$ docker build .
Sending build context to Docker daemon  38.15MB
Step 1/2 : FROM alpine
 ---> a187dde48cd2
Step 2/2 : COPY a b /di\r
When using COPY with more than one source file, the destination must be a directory and end with a /
$ docker run -v `pwd`/Dockerfile:/Dockerfile rcjsuen/dockerfile-utils lint /Dockerfile
Line: 2-3
COPY a b /di\
         ^^^^
\

Error: When using COPY with more than one source file, the destination must be a directory and end with a / or a \

closed time in 16 days

rcjsuen

issue openedrcjsuen/dockerfile-utils

ENV instruction that spans multiple lines and only has a comment is not flagged as an error

This Dockerfile should produce a linting error.

FROM scratch
ENV \
    # comment
$ docker build .
Sending build context to Docker daemon  46.79MB
Error response from daemon: Dockerfile parse error line 2: ENV requires at least one argument

created time in 16 days

push eventrcjsuen/dockerfile-language-service

Remy Suen

commit sha a5f34d040cd580cc4f7f9db17afc99beece69adf

WIP #54 Improve handling of flag options for semantic tokens Having an instruction with a flag option without a value follow one with a value will no longer raise an error. Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 16 days

push eventrcjsuen/dockerfile-language-service

Remy Suen

commit sha bd4eb9e9596013aab06c79723c83993c4259f231

Fix #69 Update CHANGELOG.md Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 16 days

push eventrcjsuen/dockerfile-language-service

Remy Suen

commit sha c57882f92de9019e4a13b20b668e4583e18d24bf

Fix #69 Fix semantic tokens of a comment embedded in an ENV If an ENV instruction spans multiple lines and an embedded comment appears before any declared variables, the semantic token calculation will get stuck in an infinite loop. This has now been fixed with an upgrade to dockerfile-ast. Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 16 days

issue closedrcjsuen/dockerfile-language-service

Infinite loop with embedded comments in an instruction

ENV \
# common variables:
  ENV1=something
  ENV2=999
import { DockerfileLanguageServiceFactory } from 'dockerfile-language-service'
let content = "ENV \\\n# common variables:\n  ENV1=something \\\n  ENV2=999";
const service = DockerfileLanguageServiceFactory.createLanguageService();
service.computeSemanticTokens(content);
/dockerfile-language-service/out/src/dockerSemanticTokens.js:274
    createToken(instruction, range, tokenType, tokenModifiers = [], checkVariables = true, checkStrings = false, checkNewline = true) {
               ^

RangeError: Maximum call stack size exceeded
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:274:16)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)

closed time in 16 days

rcjsuen

issue commentmicrosoft/language-server-protocol

Vi-Việt Nam!

@AMAZALK I see you have also opened #1015 and #1024. What are you trying to do with these issues and pull requests? Can you elaborate on what you wish to achieve?

AMAZALK

comment created time in 17 days

issue commentrcjsuen/dockerfile-language-server-nodejs

The server does not launch.

So turns out the client (IDE) needs to start a server that's listening, which means the LSP server (that acts like a client )connects to the client (IDE, which is a server listening on port 300).

@cotigao That is correct.

cotigao

comment created time in 17 days

created tagrcjsuen/dockerfile-ast

tagv0.0.27

An npm module for parsing Dockerfiles powered by TypeScript.

created time in 17 days

push eventrcjsuen/dockerfile-ast

Remy Suen

commit sha e165a972dd0d2ef2edf5f791ad6d66769d37ae95

Prepare for the v0.0.27 release Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 17 days

push eventrcjsuen/dockerfile-ast

Remy Suen

commit sha 040beb4bbfbfc14307680a5e2e6455fa2553e5a7

Update yargs and yargs-parser to address security advisory https://www.npmjs.com/advisories/1500 Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

Remy Suen

commit sha 2c9873faaf532d38dc9098ac924aeb45e197f130

Increase code coverage of FlagOption Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 17 days

push eventrcjsuen/dockerfile-ast

Remy Suen

commit sha 2ec0f6cbe2088c417a92a547cb24a51c9f59b7f1

Fix #80 Parse comments that immediately follow an ARG or ENV Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in 17 days

issue closedrcjsuen/dockerfile-ast

ARG and ENV instructions do not ignore comments correctly

ARG \
# comment
var=value
ENV \
# comment
var=value
import { DockerfileParser, PropertyInstruction } from 'dockerfile-ast';

let dockerfile = DockerfileParser.parse("ENV \\\n# comment");
let instruction = dockerfile.getInstructions()[0];
let properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);

dockerfile = DockerfileParser.parse("ENV \\\n# comment\nvar=value");
instruction = dockerfile.getInstructions()[0];
properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);
console.log(properties[0].getName());

dockerfile = DockerfileParser.parse("ARG \\\n# comment");
instruction = dockerfile.getInstructions()[0];
properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);

dockerfile = DockerfileParser.parse("ARG \\\n# comment\nvar=value");
instruction = dockerfile.getInstructions()[0];
properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);
console.log(properties[0].getName());

We should expect the first scenario to not have any properties and the second to have a property with a name of var. This is not the case though.

1
1
#
1
1
#

closed time in 17 days

rcjsuen

issue commentrcjsuen/dockerfile-language-service

Infinite loop with embedded comments in an instruction

This is likely due to a bug in the parser. See https://github.com/rcjsuen/dockerfile-ast/issues/80.

rcjsuen

comment created time in 17 days

issue openedrcjsuen/dockerfile-ast

ARG and ENV instructions do not ignore comments correctly

ARG \
# comment
var=value
ENV \
# comment
var=value
import { DockerfileParser, PropertyInstruction } from 'dockerfile-ast';

let dockerfile = DockerfileParser.parse("ENV \\\n# comment");
let instruction = dockerfile.getInstructions()[0];
let properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);

dockerfile = DockerfileParser.parse("ENV \\\n# comment\nvar=value");
instruction = dockerfile.getInstructions()[0];
properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);
console.log(properties[0].getName());

dockerfile = DockerfileParser.parse("ARG \\\n# comment");
instruction = dockerfile.getInstructions()[0];
properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);

dockerfile = DockerfileParser.parse("ARG \\\n# comment\nvar=value");
instruction = dockerfile.getInstructions()[0];
properties = (instruction as PropertyInstruction).getProperties();
console.log(properties.length);
console.log(properties[0].getName());

We should expect the first scenario to not have any properties and the second to have a property with a name of var. This is not the case though.

1
1
#
1
1
#

created time in 17 days

issue commentrcjsuen/dockerfile-language-server-nodejs

The server does not launch.

@cotigao Did you open up port 3000 so that it is listening for connections?

cotigao

comment created time in 17 days

issue commentmicrosoft/language-server-protocol

How to invoke a language server from command line?

I would like to query a language server from a cli utility, but I am having a hard time making first contact. How can I go about doing this?

@Gauteab Do you know how the language server communicates with the client? Sockets or stdin/stdout or something else?

Are there any examples of "standalone" lsp clients (not part of a editor extension)?

If you are familiar with TypeScript I have a few (very rudimentary) examples in my language server's README.md file that may get you started.

You can also try looking at my server.test.ts file I suppose.

Gauteab

comment created time in 19 days

issue commentTypeFox/monaco-languageclient

Will lsp functionality breaks if we use socket.io instead of ws?

@rcjsuen Need your thoughts on this?

@GNSubrahmanyam No idea, I do not have this use case.

GNSubrahmanyam

comment created time in 22 days

pull request commentmicrosoft/vscode-languageserver-node

Add calls to validatePosition for some requests

Is there some pointer how I might be able to add custom middleware?

@davidanthoff Maybe #322 and #628 can help?

davidanthoff

comment created time in 23 days

issue commentmicrosoft/vscode-docker

Request textDocument/semanticTokens failed

@csakaszamok Thank you for sharing your Dockerfile. I have opened https://github.com/rcjsuen/dockerfile-language-service/issues/69 to track this.

csakaszamok

comment created time in 23 days

issue openedrcjsuen/dockerfile-language-service

Infinite loop with embedded comments in an instruction

ENV \
# common variables:
  ENV1=something
  ENV2=999
import { DockerfileLanguageServiceFactory } from 'dockerfile-language-service'
let content = "ENV \\\n# common variables:\n  ENV1=something \\\n  ENV2=999";
const service = DockerfileLanguageServiceFactory.createLanguageService();
service.computeSemanticTokens(content);
/dockerfile-language-service/out/src/dockerSemanticTokens.js:274
    createToken(instruction, range, tokenType, tokenModifiers = [], checkVariables = true, checkStrings = false, checkNewline = true) {
               ^

RangeError: Maximum call stack size exceeded
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:274:16)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)
    at DockerSemanticTokens.createToken (/dockerfile-language-service/out/src/dockerSemanticTokens.js:451:18)

created time in 23 days

issue commentmicrosoft/vscode-docker

Request textDocument/semanticTokens failed

@csakaszamok Thank you for your bug report. I presume this bug is not reproducible?

Can you share your Dockerfile? Do you remember what you were changing at the time?

csakaszamok

comment created time in 24 days

issue commentjminuscula/dixit-online

Getting error starting server

@lpamu I encountered the same issue. See #5.

lpamu

comment created time in 25 days

issue commentTypeFox/monaco-languageclient

Issue with ProtocolToMonacoConverter

@zkrami You should also validate what your custom codeAction function is returning.

zkrami

comment created time in a month

issue commentTypeFox/monaco-languageclient

Issue with ProtocolToMonacoConverter

Here is the structure I am receiving:

 {
   "title":"Replace VLOOKUP",
   "edit":{
      "edits":[
         {
            "resource":{            
            },
            "edits":[
               {
                  "range":{
                     "startLineNumber":1,
                     "startColumn":1,
                     "endLineNumber":1,
                     "endColumn":84
                  },
                  "text":"Inserted text "
               }
            ]
         }
      ]
   },
   
   "kind":"quickfix"
}

@zkrami Your resource looks weird. It shouldn't be an empty object. Step into the asCodeAction function and see what's happening.

zkrami

comment created time in a month

issue commentTypeFox/monaco-languageclient

Issue with ProtocolToMonacoConverter

Here is the structure I am receiving:

 {
   "title":"Replace VLOOKUP",
   "edit":{
      "edits":[
         {
            "resource":{            
            },
            "edits":[
               {
                  "range":{
                     "startLineNumber":1,
                     "startColumn":1,
                     "endLineNumber":1,
                     "endColumn":84
                  },
                  "text":"Inserted text "
               }
            ]
         }
      ]
   },
   
   "kind":"quickfix"
}

@zkrami How are you getting this? I don't see anything in your seven lines of code that would correspond to that?

formulaLanguageService.codeAction(document, range, diagnostic,uri)

None of the four arguments here looks like they are related to the above JSON blob.

zkrami

comment created time in a month

issue commentTypeFox/monaco-languageclient

Issue with ProtocolToMonacoConverter

@zkrami Sorry, but I'm having troubles following. Can you provide some more context?

The client is sending your server a textDocument/codeAction request?

zkrami

comment created time in a month

issue commentryceg/Eigengrau-s-Essential-Establishment-Generator

Cannot read property 'temperature' of undefined

Oh wait, here it is.

Uncaught Error: <<set>>: bad evaluation: Cannot read property 'temperature' of undefined
    at Function.value ((index):56169)
    at HTMLButtonElement.<anonymous> ((index):56171)
    at HTMLButtonElement.<anonymous> ((index):56170)
    at HTMLButtonElement.<anonymous> ((index):56167)
    at HTMLButtonElement.dispatch ((index):59)
    at HTMLButtonElement.v.handle ((index):59)
rcjsuen

comment created time in a month

issue openedryceg/Eigengrau-s-Essential-Establishment-Generator

Cannot read property 'temperature' of undefined

Describe the bug Error shows up while trying to spam scenarios.

To Reproduce Town Hash (the bit that comes after eigengrausgenerator.com- typically in the format of #adjectiveadjectiveanimal): #darlinggrandairedaleterrier

  1. Open: https://eigengrausgenerator.com/#darlinggrandairedaleterrier
  2. Spring > Town Encounter
  3. Keep clicking "Create Scenario" until the bug appears.

image

Additional context Unfortunately, you can't select text from that modal dialog. I don't see anything useful in the Chrome debugger console either.

created time in a month

push eventrcjsuen/dockerfile-language-service

Remy Suen

commit sha 3297d2352bfd7236ad9d828ee5566e5b4ac28228

Fix #67 Enable definition navigation of build stages Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in a month

issue closedrcjsuen/dockerfile-language-service

Compute build stage definition for navigation

import { DockerfileLanguageServiceFactory } from './main'
const service = DockerfileLanguageServiceFactory.createLanguageService();
let items = service.computeDefinition({ uri: "file:///a/b/Dockerfile" }, "FROM alpine AS base\nFROM base", { line: 1, character: 6 });
console.log(items);
null

We should add support for jumping to the build stage for easier navigation of Dockerfiles instead of returning null.

closed time in a month

rcjsuen

push eventrcjsuen/dockerfile-language-service

Remy Suen

commit sha 7f1fddca20e1521abda4f7d35d71d16f69566aa7

Fix #68 Stop returning build stage names as links Build stages should be filtered out so that they are not considered as a link to open Docker Hub. Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in a month

issue closedrcjsuen/dockerfile-language-service

Build stages should not be included as a link

FROM alpine AS base
FROM base
import { DockerfileLanguageServiceFactory } from 'dockerfile-language-service';
const service = DockerfileLanguageServiceFactory.createLanguageService();
let items = service.computeLinks("FROM alpine AS base\nFROM base");
console.log(items);
[ { range: { start: [Object], end: [Object] }, data: '_/alpine/' },
  { range: { start: [Object], end: [Object] }, data: '_/base/' } ]

Only the first line should be a valid link to Docker Hub. We shouldn't be returning two items here.

closed time in a month

rcjsuen

issue commentmicrosoft/vscode-docker

Ctrl Click on FROM leads to a DockerHub link, instead of a stage in a multi-stage config

I just noticed that the recent update has made it possible to Ctrl+Click on the image name, and then open an appropriate one in DockerHub, which is fantastic! .

Interesting, that feature should have been there for at least a year now... 🤔 Well, glad you find it useful, @samhwang!

As to your issue, thank you for bringing this to my attention. I have opened two tickets to address this.

  • https://github.com/rcjsuen/dockerfile-language-service/issues/67
  • https://github.com/rcjsuen/dockerfile-language-service/issues/68
samhwang

comment created time in a month

issue openedrcjsuen/dockerfile-language-service

Build stages should not be included as a link

FROM alpine AS base
FROM base
import { DockerfileLanguageServiceFactory } from 'dockerfile-language-service';
const service = DockerfileLanguageServiceFactory.createLanguageService();
let items = service.computeLinks("FROM alpine AS base\nFROM base");
console.log(items);
[ { range: { start: [Object], end: [Object] }, data: '_/alpine/' },
  { range: { start: [Object], end: [Object] }, data: '_/base/' } ]

Only the first line should be a valid link to Docker Hub. We shouldn't be returning two items here.

created time in a month

issue openedrcjsuen/dockerfile-language-service

Compute build stage definition for navigation

import { DockerfileLanguageServiceFactory } from './main'
const service = DockerfileLanguageServiceFactory.createLanguageService();
let items = service.computeDefinition({ uri: "file:///a/b/Dockerfile" }, "FROM alpine AS base\nFROM base", { line: 1, character: 6 });
console.log(items);
null

We should add support for jumping to the build stage for easier navigation of Dockerfiles instead of returning null.

created time in a month

issue commentTypeFox/monaco-languageclient

How do I get proper highlighting (e.g. for python)?

@rcjsuen Any update ?

@GNSubrahmanyam I am not actively looking at this issue so I have nothing to share.

arogozhnikov

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

How to get the lsp response in vscode-language-client?

I intercept the response and process it . It confused me now that how can i send my processed response to vscode client?

Aren't you doing that already with your return processed_result; line?

Abbyyan

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

How to get the lsp response in vscode-language-client?

I've tried it but it seems something doesn't work like this. Hope for your advice . Thanks a lot.

@Abbyyan I don't understand. You just said it worked an hour ago (https://github.com/microsoft/vscode-languageserver-node/issues/628#issuecomment-638822141)?

Abbyyan

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

How to get the lsp response in vscode-language-client?

How can i get the full completion items in the server response? Should i use provideCompletionItem or resolveCompletionItem ? Thanks for your help.

You probably want the former but you may want both depending on your exact use case.

Is there some documents shows how to use them please?

Maybe the code from #322 may serve as a bit of a reference for you.

Abbyyan

comment created time in a month

issue commentTypeFox/monaco-languageclient

Message: Internal Error - System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln) file.

I fixed this issue. Workspace path was wrong. Thanks

@GNSubrahmanyam Your path looked okay in https://github.com/TypeFox/monaco-languageclient/issues/213#issuecomment-636374029 though. What was wrong?

GNSubrahmanyam

comment created time in a month

issue commentTypeFox/monaco-languageclient

Message: Internal Error - System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln) file.

@rcjsuen Can you help me to fix it?

@GNSubrahmanyam Don't think anyone can really help you fix it unless they can clone your code or you have a completely self-contained example that reproduces the problem.

GNSubrahmanyam

comment created time in a month

issue commentTypeFox/monaco-languageclient

Message: Internal Error - System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln) file.

@rcjsuen still this is not fixed

@GNSubrahmanyam You should check the path that you are sending to the language server I guess.

GNSubrahmanyam

comment created time in a month

issue commentmicrosoft/language-server-protocol

Support semantic highlighting

@kjeremy can you elaborate why you think this. I am open for a better proposal. So far we didn't have the problem of a full and range request of the same type.

@dbaeumer @kjeremy What about the formatting requests?

  • textDocument/formatting
  • textDocument/rangeFormatting
hackwaly

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Notifications are not being handled

@rcjsuen I also had the documents.all() call, but I can live without it and validate just the open document.

You can also keep the opened documents in memory and validate them if you have that requirement.

afonsojramos

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Notifications are not being handled

@afonsojramos Not sure I completely follow what you're saying but it sounds like you want to just not use TextDocuments and delete your documents field...?

afonsojramos

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Notifications are not being handled

https://gist.github.com/afonsojramos/5dc8b928e1b9a8aa32958f9728b300cc#file-server-ts-L28-L30

@afonsojramos The issue is likely your use of the TextDocuments manager class. It sounds just like https://github.com/microsoft/vscode-languageserver-node/issues/176#issuecomment-324633001.

afonsojramos

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Notifications are not being handled

@afonsojramos Please share your code.

afonsojramos

comment created time in a month

issue commentmicrosoft/language-server-protocol

Diagnostic Range Update

@afonsojramos Please open a ticket in the relevant LSP client/server library that you are using. I assume you are using microsoft/vscode-languageserver-node but I could be wrong.

afonsojramos

comment created time in a month

issue commentmicrosoft/language-server-protocol

Diagnostic Range Update

Bear in mind that I have a Diagnostic Array saved in the extension which I can update and then send again to the client.

If you offset your diagnostics based on what the user typed and send it back to the client, what happens?

afonsojramos

comment created time in a month

delete branch rcjsuen/language-server-protocol

delete branch : patch-8

delete time in a month

issue commentmicrosoft/language-server-protocol

client -> server requst: Goto Parent Module

Response: Location | Location[] | LocationLink[] | null

Would multiple files be opened if an array was returned?

matklad

comment created time in a month

push eventrcjsuen/language-server-protocol

Remy Suen

commit sha cc22ef7a23513fda73f12822efd71639de2ffaaa

Fix typo of "revers" to "reverse" Signed-off-by: Remy Suen <remy.suen@gmail.com>

view details

push time in a month

issue commentmicrosoft/monaco-editor

Completion item provider does not work

@YevhenKap No idea. I guess you could start by checking if the provideCompletionItems function is even getting called.

YevhenKap

comment created time in a month

issue commentmicrosoft/monaco-editor

Suggestion Proposal List is not showing if proposal start with non alphabet character

@chenjunweii Works fine for me in the Monaco Editor Playground.

const arrOperators = ["a<", ">b",  ">", "awd"]
const createOperatorProposals = (range) => {
  return arrOperators.map((v) => ({ 
    label : v,
    filterText : v,
    insertText : v,
  }))
}

monaco.languages.registerCompletionItemProvider('json', {
    provideCompletionItems: function(model, position) {
        const word = model.getWordUntilPosition(position);
        const range = {
            startLineNumber: position.lineNumber,
            endLineNumber: position.lineNumber,
            startColumn: word.startColumn,
            endColumn: word.endColumn
        };
        return {
            suggestions: createOperatorProposals(range)
        };
    }
});

monaco.editor.create(document.getElementById("container"), {
    value: "",
    language: "json"
});

image

chenjunweii

comment created time in a month

issue commentmicrosoft/language-server-protocol

Diagnostic Range Update

Now the problem that I face is if the user makes changes to the file after I have provided the diagnostics. Is there a way for me to easily update the diagnostics range?

@afonsojramos You can't update individual diagnostics. You always send the whole set of diagnostics that pertain to a URI.

afonsojramos

comment created time in a month

issue commentmicrosoft/monaco-editor

Completion item provider does not work

Strange... Except of findArray item you have other suggest items that monaco shows. Maybe there is a problem? Because I haven't any suggestion at all...

@YevhenKap When you try the code I pasted you see nothing?

YevhenKap

comment created time in a month

pull request commentmicrosoft/vscode-languageserver-node

fix InsertTextFormat comment

@dbaeumer Looks like this should be a canonical link instead. Otherwise, the specification of a snippet changes as modifications are made to that Markdown file instead of a snapshot of it in time. 🤔

h-michael

comment created time in a month

issue commentmicrosoft/monaco-editor

Completion item provider does not work

I have tried official example and it also does not work.

@YevhenKap Seems to work for me but maybe I'm misunderstanding something.

image

  monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
    noSemanticValidation: true,
    noSyntaxValidation: true
  });
  monaco.languages.registerCompletionItemProvider("javascript", {
    triggerCharacters: ["."],
    provideCompletionItems: (model, position, context, token) => (
        {
            suggestions: [
                {
                    label: 'findArray',
                    kind: monaco.languages.CompletionItemKind.Function
                }
            ]
        }
    )
  });

monaco.editor.create(document.getElementById("container"), {
    value: "",
    language: "javascript"
});
YevhenKap

comment created time in a month

issue commentmicrosoft/monaco-editor

Is there a way to show example code or hint ?

I also tried using detail and documentation in CompletionItem, but that is a two-step action, which clicking with the mouse is required

@chenjunweii If you use <kbd>Control</kbd>+<kbd>Space</kbd>, the documentation text will appear. I'm on a Mac keyboard here so can't confirm what the keybinding would be on Windows and Linux.

chenjunweii

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Why does the response to my request (to client) for config settings contain nulls?

@ZacLN Definitely looks like a bug to me.

ZacLN

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Why does the response to my request (to client) for config settings contain nulls?

Thanks! It seems this is the culprit.

Can you test that code with "" and 0? I feel like they should return null also... 🤔

ZacLN

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Why does the response to my request (to client) for config settings contain nulls?

I don't have any idea of how to get started with debugging the editor in unison with the extension, is there some guide available?

Not sure. The only document I'm aware of is the Language Server Extension Guide. Otherwise, I just go inside my node_modules folder and just add breakpoints and print statements to see what's happening.

ZacLN

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Why does the response to my request (to client) for config settings contain nulls?

@ZacLN What did you find when you added breakpoints and/or print statements in configuration.ts?

ZacLN

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Why does the response to my request (to client) for config settings contain nulls?

Sounds like some TypeScript/JavaScript conversion issue...?

@ZacLN Do you have issues with 0 or "" and other such "falsy" values?

ZacLN

comment created time in a month

Pull request review commentbash-lsp/bash-language-server

Code completion improvements

 Helper function to add a user",       ]     `)   })++  it('responds to onCompletion with all variables when starting to expand parameters', async () => {+    const { connection, server } = await initializeServer()+    server.register(connection)++    const onCompletion = connection.onCompletion.mock.calls[0][0]++    const result: any = await onCompletion(+      {+        textDocument: {+          uri: FIXTURE_URI.SOURCING,+        },+        position: {+          // $+          line: 14,+          character: 7,+        },+      },+      {} as any,+      {} as any,+    )++    const itemKinds = result.map((item: any) => item.kind)++    // they are all variables+    expect(itemKinds.every((kind: any) => kind === lsp.CompletionItemKind.Variable)).toBe(+      true,+    )

Might want to check the length of the itemKinds array or at least check that itemKinds.length > 0. Otherwise, the test would pass even if itemKinds was an empty array (which would be incorrect).

skovhus

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Adopt API changes in call hierarchy

SGTM though I haven't had time to write the LSP docs so if you want to take that on...

@kjeremy Looks like @dbaeumer has aslready added it in https://github.com/microsoft/language-server-protocol/commit/e73586714908822dec381f9ff719620a6094d379.

dbaeumer

comment created time in a month

issue commentmicrosoft/vscode-languageserver-node

Adopt API changes in call hierarchy

@kjeremy @dbaeumer Time to close since #614 has been merged?

dbaeumer

comment created time in a month

issue commentmicrosoft/language-server-protocol

Support postfix completion like Intellij IDEA.

@zgqq Postfix completion has been mentioned in the past in #92 but the discussion seems to have stalled a bit.

zgqq

comment created time in 2 months

Pull request review commentTypeFox/monaco-languageclient

Bump to monaco-editor 0.20.0

 export class MonacoLanguageClient extends BaseLanguageClient {         }     } +    public registerProposedFeatures() {+        this.registerFeature(new CallHierarchyFeature(this));

@CGNonofr I was more asking to make sure I hadn't missed it while looking at the code.

I don't think it's the end of the world to register it. It just needs to be made clear that this is unsupported given that Monaco does not support it.

CGNonofr

comment created time in 2 months

issue commentmicrosoft/vscode-languageserver-node

Api to get the VsCode autodetected indentation spaces of a file

@nvuillam I just use what's in the FormattingOptions of the passed in DocumentFormattingParams and it appears to match the indentation that VS Code detects. You shouldn't have to do anything extra here.

nvuillam

comment created time in 2 months

Pull request review commentTypeFox/monaco-languageclient

Bump to monaco-editor 0.20.0

 export class MonacoLanguageClient extends BaseLanguageClient {         }     } +    public registerProposedFeatures() {+        this.registerFeature(new CallHierarchyFeature(this));

Should CallHierarchyFeature be registered? I don't think Monaco supports this feature, does it?

CGNonofr

comment created time in 2 months

pull request commentmicrosoft/vscode-docker

[Python] Use debugpy launch

Ahh, I love it: image Removing code feels like spring cleaning 😄

Yeah, it was very relieving 😄

Deleted code is the best code.

haniamr

comment created time in 2 months

issue commentTypeFox/monaco-languageclient

Message: Internal Error - System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln) file.

@rcjsuen Is that a breaking changes all my language server pyls, csharp has stopped working

@GNSubrahmanyam If it was a breaking change, I imagine there would be a lot more bugs open about this.

You appear to be using Monaco Editor 0.20.0 which is not currently supported. See #207.

GNSubrahmanyam

comment created time in 2 months

issue commentmicrosoft/language-server-protocol

How to pass extra options from UI into a language service?

In the web page, users will be able to tune several parameters about the formatting of the code, for example ribbonWidth, which indicates the maximum number of non-indentation characters that should appear on a line; and limitWidth, which indicates the maximum number of characters that should appear on a line.

@chengtie ribbonWidth and limitWidth are not defined in the protocol for FormattingOptions. You should not expect these options to be respected by a language server (I guess there are some out there that expects these options?). I presume you are okay with this and that the OCaml language server supports these options...?

I want to pass all these parameters via components and finally to formatCode(document.getText(), <parameters>, but I don't know how.

This sounds more like a generic question related to React and/or the Monaco Editor than the LSP.

chengtie

comment created time in 2 months

issue commentTypeFox/monaco-languageclient

Message: Internal Error - System.ArgumentException: OmniSharp only supports being launched with a directory path or a path to a solution (.sln) file.

@GNSubrahmanyam You can review the diff between 0.12.0 and 0.13.0 I guess.

What paths do you see being sent between 0.12.0 and 0.13.0?

GNSubrahmanyam

comment created time in 2 months

more