Skip to content
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

Be consistent about casing in Query History menu #1369

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

elenatanasoiu
Copy link
Contributor

@elenatanasoiu elenatanasoiu commented May 31, 2022

Reported here: https://github.com/github/code-scanning/issues/6008

We originally started out by capitalizing each word 1, but made some
small changes 2 which resulted in our Query History options being
inconsistent.

Let's fix that.

Questions

TL;DR: are we comfortable with pinning the node version in an .nvmrc file?

Building the extension: I've followed the contribution docs to do this using npm build. However, I could only complete the build successfully once I downgraded to node v16.14.2. For node v18 the build fails. Would we be okay with adding a .nvmrc file in this repo?

To provide a bit more context: I only found the correct version by spinning up a codespace and snooping around. "Why don't you build the extension in a codespace?" you ask. While it does build successfully, it doesn't seem like you're able to then install the resulting .vsix file into VSCode. Happy to be told otherwise.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@elenatanasoiu elenatanasoiu requested a review from a team as a code owner May 31, 2022 16:39
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

extensions/ql-vscode/package.json Outdated Show resolved Hide resolved
@aeisenberg
Copy link
Contributor

Hmmm...I wasn't aware that the extension wasn't building in node v18. It's definitely worth fixing eventually, but in general, we need to stay in sync with the node version shipped with vscode (currently v16.13.0).

I think it is fine to add a .nvmrc file. Also, we should update the engine field in package.json to include a max version as well as min. Using ^16.11.25 should be fine since it allows for anything less than 17.0.0.

Would you be able to raise an issue for the broken build on v18? It's something we should fix before vscode moves to v18.

Reported here: github/code-scanning#6008

We originally started out by capitalizing each word [1], but made some
small changes [2] which resulted in our Query History options
being inconsistent.

Let's fix that.

[1]: https://github.com/github/vscode-codeql/blame/a5da5564969a0f37f95f1fe8b856f60810fc5caa/extensions/ql-vscode/package.json
[1]: b470e41
@elenatanasoiu elenatanasoiu force-pushed the elenatanasoiu/fix-casing-query-history branch from c5bbb92 to 7e70f8b Compare May 31, 2022 17:34
@charisk
Copy link
Contributor

charisk commented Jun 1, 2022

Seems a bit silly but do we need to update the CHANGELOG file? The PR description check-list suggests yes. cc @shati-patel

@shati-patel
Copy link
Contributor

Seems a bit silly but do we need to update the CHANGELOG file? The PR description check-list suggests yes. cc @shati-patel

No harm in updating the changelog, but it's definitely not necessary in this case since it's such a minor change!

@elenatanasoiu
Copy link
Contributor Author

Thanks @charisk & @shati-patel. Have added a line to the changelog.

Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@elenatanasoiu elenatanasoiu merged commit 475d7cc into main Jun 1, 2022
@elenatanasoiu elenatanasoiu deleted the elenatanasoiu/fix-casing-query-history branch June 1, 2022 11:24
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], we want to stay in sync with the current
node version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to
the preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently
fails in Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], we want to stay in sync with the current node
version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to the
preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently fails in
Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], we want to stay in sync with the current node
version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to the
preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently fails in
Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here [1], since the current build for this extension
does not work with Node v18 [2], it would be good to set a maximum
node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version,
which in this case is v17.0.0.

[1]: #1369 (comment)
[2]: #1373
@elenatanasoiu
Copy link
Contributor Author

elenatanasoiu commented Jun 1, 2022

Thanks for the suggestions @aeisenberg, I've opened an issue here for Node v18 and a PR to update the engine field and add a .nvmrc file here.

elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version [shipped with VSCode](https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2)  (v16.13.0).

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0): https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2).

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2.

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions and point to the right place to check for current supported versions.
elenatanasoiu added a commit that referenced this pull request Jun 1, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
elenatanasoiu added a commit that referenced this pull request Jun 13, 2022
As recommended here #1369 (comment), we want to stay in sync with the current node version shipped with
VSCode (v16.13.0):

https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2

For this we can add a `.nvmrc` file to alert nvm to switch to the preferred version automatically.

It will also help prevent builds from failing when setting up the project for the first time, as building the extension currently fails in Node v18: #1373

We're also updating the docs to mention using `nvm` to manage node versions and point to the right place to check for current supported versions.
elenatanasoiu added a commit that referenced this pull request Jun 13, 2022
As recommended here #1369 (comment), since the current build for this extension does not work with Node v18 #1373, it would be good to set a maximum node version until this gets addressed.

So we're updating `engines` here to allow for a maximum version, which in this case is v17.0.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants