robocorp / robotframework-lsp

Robocorp extensions for VS Code: Robocorp Code and RFW LSP
https://robocorp.com/docs/developer-tools/visual-studio-code
Apache License 2.0
201 stars 91 forks source link

Contribution guidelines need updating #1008

Open n8jhj opened 9 months ago

n8jhj commented 9 months ago

Is your feature request related to a problem? Please describe.

I'm trying to contribute to robotframework-lsp but don't know how to run the tests. There are a few sticking points I've noticed so far in following the directions on the Contributing page:

  1. Setting up Yarn is... frustrating. I am not a Javascript developer so haven't had any experience with it. Specifically, when running yarn exec env, I get an unhelpful SyntaxError.
/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:5422
        return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
                                           ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/corepack/dist/yarn.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

I'm on Ubuntu Linux, if that helps.

It would be helpful if there were even some mention of what Yarn is needed for. Maybe for the specific thing I want to test, Yarn isn't even required. I would be happy if that were the case.

  1. No mention of Poetry, even though within robocorp-code/ I notice a poetry.lock and [tool.poetry] section in pyproject.toml. Luckily I am a heavy user of Poetry and knew what to do to install dependencies. (I deactivated my virtual environment created via the instructions on the Contrib page, ran cd robocorp-code, and ran poetry install.)
  2. No instruction on setting up for tests. After running poetry run pytest from within robocorp-code/, I am getting lots of errors with AssertionError: CI_ENDPOINT env variable must be specified for tests. I could not find any instructions on what that should be set to.

Describe the solution you'd like

I want the Contrib page to be updated to address these points.

Describe alternatives you've considered

I can't think of any viable alternatives.

fabioz commented 9 months ago

Humm, I don't see yarn exec env anywhere in the page... Usually I just use yarn install and it works.

Also, do you want to contribute to robocorp-code or robotframework-lsp?

n8jhj commented 9 months ago

Humm, I don't see yarn exec env anywhere in the page... Usually I just use yarn install and it works.

You're correct. I went down the path of install page > corepack page (linked in my question) to figure out how to install yarn and found yarn exec env there. I'll give yarn install a try and get back to you.

Also, do you want to contribute to robocorp-code or robotframework-lsp?

robotframework-lsp. I thought robocorp-code was a part of lsp?

(However, since writing this question, a bug I was pursuing in LSP turned out to actually be a bug in robotframework. So I'll be looking to contribute there.)