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

New Release #917

Merged
merged 36 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e439b05
sphinx-agent: Move `Uri` implementation into its own file
alcarney Sep 22, 2024
f2b0082
lsp: Implement a `${defaultBuildDir}` config variable
alcarney Sep 24, 2024
dd55dd9
lsp: mypy fixes
alcarney Sep 24, 2024
0027e53
docs: Update dependencies
alcarney Sep 24, 2024
ea91f01
docs: Use the `${defaultBuildDir}` placeholder
alcarney Sep 24, 2024
7f19d97
docs: Document the `${defaultBuildDir}` variable
alcarney Sep 25, 2024
3e1eb23
lsp: Ensure filepaths are properly escaped
alcarney Sep 25, 2024
c89ec6b
lsp: Create a placeholder for a client at the given scope
alcarney Sep 29, 2024
ca88887
sphinx-agent: Fix the `esbonio.preview.showLineMarkers` option
alcarney Sep 29, 2024
8f0e644
code: Compare the string representation of URIs
alcarney Sep 29, 2024
7f16384
sphinx-agent: Rewrite internal links
alcarney Sep 29, 2024
493eaac
code: Use `vscode.env.asExternalUri` to generate preview uris
alcarney Sep 29, 2024
3f03231
code: Derive CSP string from `asExternalUri`
alcarney Sep 30, 2024
79d8eb8
code: Set `style-src-attr 'unsafe-inline'`
alcarney Oct 4, 2024
d424314
code: Rewrite previewUri based on asExternalUri result
alcarney Oct 4, 2024
0594794
code: Check against `window.location.origin` rather than hardcoded value
alcarney Oct 4, 2024
576c53f
sphinx-agent: Take entire websocket URL from query parameter
alcarney Oct 4, 2024
4ced573
code: Rewrite preview uri handling
alcarney Oct 5, 2024
34d4e51
code: Add missing type information for `esbonio.sphinx.pythonCommand`
alcarney Oct 9, 2024
33a8865
build(deps-dev): bump ovsx from 0.9.4 to 0.9.5 in /code
dependabot[bot] Oct 1, 2024
1880f9d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 7, 2024
33bf8ba
build(deps-dev): bump esbuild from 0.23.1 to 0.24.0 in /code
dependabot[bot] Oct 9, 2024
db519b0
build(deps-dev): bump @vscode/vsce from 3.1.0 to 3.1.1 in /code
dependabot[bot] Oct 9, 2024
3d88524
sphinx-agent: Fix Sphinx argument parsing for v8.1+
alcarney Oct 13, 2024
179730c
sphinx-agent: Suppress and report extension errors
alcarney Oct 13, 2024
eca2086
vscode: Clean up launch.json
alcarney Oct 13, 2024
d6462b2
code: Bundle a basic Sphinx env with the extension
alcarney Oct 16, 2024
aff08eb
code: Handle the case where pythonCommand is undefined
alcarney Oct 16, 2024
07121fc
code: Pass the location of the fallback env to the language server
alcarney Oct 16, 2024
4e1ca8b
lsp: Use fallback env when possible
alcarney Oct 16, 2024
a0755c5
code: Only rebuild requirements-*.txt when actually necessary
alcarney Oct 20, 2024
d9466d7
ci: Limit PR builds to 20min
alcarney Oct 20, 2024
6701fe2
sphinx-agent: Move the set of diagnostics into the `Esbonio` object
alcarney Oct 20, 2024
c2c90bd
sphinx-agent: Expose the AST for `conf.py` via an attribute
alcarney Oct 20, 2024
591748e
sphinx-agent: Implement a fallback html_theme
alcarney Oct 20, 2024
7d98957
code: Update changelog
alcarney Oct 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lsp-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
test:
name: "Python v${{ matrix.python-version }} -- ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ ci:
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.6.9
hooks:
- id: ruff
name: ruff (esbonio)
Expand Down
62 changes: 6 additions & 56 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
{
"version": "0.2.0",
"inputs": [
{
"id": "workspace",
"type": "pickString",
"description": "Pick the workspace root for this session",
"default": "code/",
"options": [
{
"label": "code",
"value": "code"
},
{
"label": "docs",
"value": "docs"
},
{
"label": "demo",
"value": "lib/esbonio/tests/workspaces/demo"
},
]
}
],
"inputs": [],
"configurations": [
{
"name": "VSCode Extension",
Expand All @@ -38,39 +17,9 @@
],
"preLaunchTask": "${defaultBuildTask}",
},
{
"name": "VSCode Web Extension",
"type": "extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}/code",
"--extensionDevelopmentKind=web",
"--folder-uri=${workspaceRoot}/${input:workspace}"
],
"outFiles": [
"${workspaceRoot}/code/dist/browser/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
},
{
"name": "Docs",
"type": "python",
"request": "launch",
"module": "sphinx.cmd.build",
"args": [
"-M",
"html",
".",
"_build",
"-Ea"
],
"python": "${command:python.interpreterPath}",
"cwd": "${workspaceFolder}/docs"
},
{
"name": "pytest: esbonio",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"justMyCode": false,
Expand All @@ -84,19 +33,20 @@
},
{
"name": "Python: Attach",
"type": "python",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/lib/esbonio",
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
],
"justMyCode": false
"justMyCode": false,
"subProcess": true,
},
],
}
3 changes: 2 additions & 1 deletion code/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bundled/libs
bundled
node_modules
*.vsix
8 changes: 6 additions & 2 deletions code/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
.bumpversion.cfg
.gitignore
.tox
.pytest_cache
**/__pycache__/**
**/.pyc
**/requirements.in
**/requirements.txt
**/requirements-*.in
**/requirements-*.txt
changes
CHANGES.rst
dist/**/*.map
dist/test
esbuild.mjs
hatch.toml
Makefile
node_modules
pyproject.toml
src/**
Expand Down
23 changes: 17 additions & 6 deletions code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ release: $(TOWNCRIER) $(HATCH) $(PY)
$(PY) ../scripts/make_release.py vscode

# Ensures the version of esbonio in ../lib/esbonio is used.
dev-deps: node_modules/.installed bundled/libs/.installed
dev-deps: node_modules/.installed bundled/libs/.installed bundled/env/.installed
-test -d bundled/libs/esbonio-*.dist-info && rm -r bundled/libs/esbonio-*.dist-info
-test -L bundled/libs/esbonio || rm -r bundled/libs/esbonio
if [ ! -f bundled/libs/esbonio/__main__.py ]; then \
Expand All @@ -34,17 +34,28 @@ dev-deps: node_modules/.installed bundled/libs/.installed
fi

# Ensures the latest version of esbonio from PyPi is used.
release-deps: node_modules/.installed bundled/libs/.installed
release-deps: node_modules/.installed bundled/libs/.installed bundled/env/.installed
-test -L bundled/libs/esbonio && rm bundled/libs/esbonio
test -d bundled/libs/esbonio-*.dist-info || $(PY39) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade $(ESBONIO)

requirements.txt: $(HATCH) requirements.in
$(HATCH) run deps:update
# Hatch is only required to exist, don't rebuild this target if it happens to be newer!
# https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
requirements-libs.txt: requirements-libs.in | $(HATCH)
$(HATCH) run deps:update-libs

bundled/libs/.installed: $(PY39) requirements.txt
requirements-env.txt: requirements-env.in | $(HATCH)
$(HATCH) run deps:update-env

bundled/libs/.installed: $(PY39) requirements-libs.txt
-test -d bundled/libs && rm -r bundled/libs
$(PY39) --version
$(PY39) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements.txt
$(PY39) -m pip install -t ./bundled/libs --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements-libs.txt
touch $@

bundled/env/.installed: $(PY39) requirements-env.txt
-test -d bundled/env && rm -r bundled/env
$(PY39) --version
$(PY39) -m pip install -t ./bundled/env --no-cache-dir --implementation py --no-deps --upgrade -r ./requirements-env.txt
touch $@

node_modules/.installed: package.json package-lock.json $(NPM)
Expand Down
1 change: 1 addition & 0 deletions code/changes/875.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ensure scrolling is still synchronised, even after scrolling the preview window
1 change: 1 addition & 0 deletions code/changes/896.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The preview window should now work when using Codespaces
1 change: 1 addition & 0 deletions code/changes/915.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The VSCode extension now provides a fallback environment in the event the user has not configured `esbonio.sphinx.pythonCommand`. The environment only includes Sphinx itself and the MyST parser but it should be enough to provide basic support
1 change: 1 addition & 0 deletions code/changes/917.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update bundled version of the language server to `1.0.0b8`
8 changes: 6 additions & 2 deletions code/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ dependencies = ["pip-tools"]
skip-install = true

[envs.deps.scripts]
update = [
update-env = [
"python --version",
"pip-compile --resolver=backtracking --generate-hashes --upgrade requirements.in",
"pip-compile --resolver=backtracking --generate-hashes --upgrade requirements-env.in --output-file requirements-env.txt",
]
update-libs = [
"python --version",
"pip-compile --resolver=backtracking --generate-hashes --upgrade requirements-libs.in --output-file requirements-libs.txt",
]
Loading
Loading