Local Zotero: sub-collections always come back empty (stray quote in collectionSQL)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- sqlite, typescript
調査の方向性
packages/editor-server/src/core/zotero/local/source.ts の 594 行目付近にある collectionSQL() から始め、553 行目付近にある creatorsSQL() とサブコレクションの分岐を比較します。生成された SQL から余分な引用符を削除し、空でない parentKey を使用して Zotero SQLite fixture に対するテストを追加するか、構文エラーを検出できるように SQL を準備します。サブコレクションが SQLite の構文エラーなしに項目を読み込めれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug
collectionSQL() in packages/editor-server/src/core/zotero/local/source.ts:594 has a stray single quote in the sub-collection branch:
const where = spec.parentKey.length > 0
? `AND collections.key = :k'` // <-- trailing '
: `AND libraries.libraryID = :k`;
The ' opens an unterminated string literal, so the query fails with a SQLite syntax error whenever spec.parentKey is non-empty, i.e. for any Zotero sub-collection read from the local database.
Impact
The error is caught in the collection reader (source.ts ~line 280: console.error(error); return collection;), so a sub-collection silently comes back with zero items. Users see the sub-collection in the citation UI with nothing in it, and nothing surfaces except a console log in the LSP output.
Top-level libraries are unaffected (they take the other branch).
Fix
Drop the quote: AND collections.key = :k. The sibling creatorsSQL() (~line 553) already has the correct form.
Testing
Worth adding a test that runs collectionSQL() for a spec with a non-empty parentKey against a fixture Zotero sqlite (or at least db.prepare()s the SQL), so a syntax error like this gets caught.
Found during the dependency-upgrade research.
- 主要言語
- TypeScript
- スター
- 655
- フォーク
- 64
- 平均マージ
- 8時間 45分
- マージ済み PR(30日)
- 36
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto のほかの issue
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)対応中かも @Bondrewd-K が 5 日前に担当しました。 オープンbug vscode
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto#1194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto#1139 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
quarto-dev/quarto#1138 ·
メンテナーはふだん 1 日以内に返信
-
Add dependabot?再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
quarto-dev/quarto#1135 ·
メンテナーはふだん 1 日以内に返信
-
AceNodeView: programmatic setSelection() marks the cursor dirty, scrolling the document to the front matter対応中かも @kevinushey が 54 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
quarto-dev/quarto#1099 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto の issue をすべて見る
似ている issue
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256オープンarea: backend documentation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
snapotter-hq/SnapOtter#2919 ·
メンテナーはふだん 1 日以内に返信
-
accepted :+1: bug db/redis
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
beekeeper-studio/beekeeper-studio#4882 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
konflux-ci/konflux-ui#1630 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ahmedkhaleel2004/gitdiagram#233 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
simkimsia/netlify-axi#19 ·
メンテナーはふだん 1 日以内に返信