dotfiles/vscode/.vscode/extensions/kevinrose.vsc-python-indent-1.18.0/DEVELOP.md
Errol Sancaktar ff17c17e23 vscode
2024-06-14 09:31:58 -06:00

3.2 KiB

Developing this extension

Thank you for your interest in helping develop this extension. If you're new to developing VSCode extensions, then you may want to try and follow the quickstart below. If something doesn't work, feel free to open an issue or submit a PR fixing this documentation!

Quickstart

  1. Download node / npm
  2. From the top level folder, run npm install to get the dependencies.
  3. Open this folder in vscode.
  4. Make your changes
  5. You can manually test your changes by navigating to "Run" -> "Run Extension" -> green arrow. This opens a sandboxed version of vscode with your updated extension.
  6. You should add unit tests for your functionality as well. These go under src/test/suite. Your PR will likely not be merged without unit tests.

Release check list

You will need vsce installed.

There is a long standing bug while authorizing the vsce command line tool, set the "Organization" to "All accessible organizations" during token creation even if there is only one organization to work around it.

  1. The CHANGELOG has been updated.
  2. git checkout master
  3. git pull
  4. Smoke test (run extension through debugger, open smoke_test.py, press enter after each line and make sure it looks good).
  5. CI has passed on the master branch.
  6. vsce publish {patch,minor,major}
  7. vsce package
  8. git push; git push --tags
  9. On GitHub, draft a release using the existing tag that was created by the publish command.
    • If you are not told that the tag already exists, then you have a typo, or you missed a step.
  10. Attach the .vsix artifact created by the package command to the draft release.
  11. Publish the release.

Getting CI to work

Unfortunately, that yaml does not fully specify the build process. There remain settings which are uncontrollable from the pipeline yaml. An export button exists on the azure website, but it is greyed out and unclickable.

Triggers

Despite what the documentation says, it doesn't seem like Azure Pipelines automatically trigger builds on branches or pull requests. To get around this, trigger and pr sections were added to azure-pipelines.yml. However, pr builds are still not working correctly.

Even with these edits, pull requests from forks are not automatically enabled, and this must be enabled through the GUI. As of writing, you can do this by going to pipelines page, clicking "Edit" -> three veritcal dots -> "Triggers" -> "Pull request validation" -> "Build pull requests from forks of this repository".

It is impossible to schedule builds in the YAML, so that must also be done through the GUI.

GitHub has old pipeline names

If you update the name of the CI build pipeline, GitHub may continue to expect the old name. To fix this, go to the repo settings page on GitHub -> branches -> "edit" next to the branch of your choice -> check/uncheck the desired build names.

Extension reporting hub

https://marketplace.visualstudio.com/manage/publishers/kevinrose/extensions/vsc-python-indent/hub (requries login)