Skip to content

Commit 7de726e

Browse files
committed
update
1 parent 20887b8 commit 7de726e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+10692
-953
lines changed

CLAUDE.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# Quarto Markdown
2-
3-
The main documentation for this repository is located at:
4-
[crates/quarto-markdown-pandoc/CLAUDE.md](crates/quarto-markdown-pandoc/CLAUDE.md)
1+
# Quarto Rust monorepo
52

63
## **WORK TRACKING**
74

85
We use bd (beads) for issue tracking instead of Markdown TODOs or external tools.
6+
We use plans for additional context and bookkeeping. Write plans to `claude-notes/plans/YYYY-MM-DD-<description>.md`, and reference the plan file in the issues.
97

108
### Quick Reference
119

@@ -101,7 +99,26 @@ When fixing ANY bug:
10199
3. **THIRD**: Implement the fix
102100
4. **FOURTH**: Run the test and verify it passes
103101

104-
**This is non-negotiable. Never implement a fix before verifying the test fails. Stop and ask the user if you cannot think of a way to mechanically test the bad behavior.**
102+
**This is non-negotiable. Never implement a fix before verifying the test fails. Stop and ask the user if you cannot think of a way to mechanically test the bad behavior. Only deviate if writing new features.**
103+
104+
## Workspace structure
105+
106+
### `crates` - corresponds to the crates in the public quarto-markdown repo
107+
108+
- `crates/qmd-syntax-helper`: a binary to help users convert qmd files to the new syntax
109+
- `crates/quarto-error-reporting`: a library to help create uniform, helpful, beautiful error messages
110+
- `crates/quarto-markdown-pandoc`: a binary to parse qmd text and produce Pandoc AST and other formats
111+
- `crates/quarto-source-map`: a library to help maintain information about the source location of data structures in text files
112+
- `crates/quarto-yaml`: a YAML parser that produces YAML objects and accurate fine-grained source location of elements
113+
- `crates/tree-sitter-qmd`: tree-sitter grammars for block and inline parsers
114+
- `crates/wasm-qmd-parser`: A WASM module with some entry points from `crates/quarto-markdown-pandoc`
115+
116+
### `private-crates` - private crates we are not going to release yet
117+
118+
- `private-crates/quarto-yaml-validation`: A library to validate YAML objects using schemas
119+
- `private-crates/validate-yaml`: A binary to exercise `quarto-yaml-validation`
120+
- `private-crates/quarto`: The future main entry point for the `quarto` command line binary.
121+
- `private-crates/quarto-core`: supporting library for `quarto`
105122

106123
## General Instructions
107124

@@ -118,6 +135,6 @@ When fixing ANY bug:
118135
- Always create a plan. Always work on the plan one item at a time.
119136
- In the tree-sitter-markdown and tree-sitter-markdown-inline directories, you rebuild the parsers using "tree-sitter generate; tree-sitter build". Make sure the shell is in the correct directory before running those. Every time you change the tree-sitter parsers, rebuild them and run "tree-sitter test". If the tests fail, fix the code. Only change tree-sitter tests you've just added; do not touch any other tests. If you end up getting stuck there, stop and ask for my help.
120137
- When attempting to find binary differences between files, always use `xxd` instead of other tools.
121-
- .c only works in JSON formats. Inside Lua filters, you need to use Pandoc's Lua API. Study https://raw.githubusercontent.com/jgm/pandoc/refs/heads/main/doc/lua-filters.md and make notes to yourself as necessary (use docs/for-claude in this directory)
138+
- .c only works in JSON formats. Inside Lua filters, you need to use Pandoc's Lua API. Study https://raw.githubusercontent.com/jgm/pandoc/refs/heads/main/doc/lua-filters.md and make notes to yourself as necessary (use claude-notes in this directory)
122139
- Sometimes you get confused by macOS's weird renaming of /tmp. Prefer to use temporary directories local to the project you're working on (which you can later clean)
123140
- The documentation in docs/ is a user-facing Quarto website. There, you should document usage and not technical details.

Cargo.lock

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ members = [
66
resolver = "2"
77

88
[workspace.package]
9+
version = "0.1.0"
910
authors = ["Posit Software, PBC"]
1011
homepage = "https://github.com/posit-dev/quarto-markdown-syntax"
1112
keywords = ["parser"]
@@ -16,21 +17,25 @@ edition = "2024"
1617

1718
[workspace.dependencies]
1819
anyhow = "1.0.89"
20+
ariadne = "0.4"
21+
clap = { version = "4.5", features = ["derive", "cargo"] }
1922
insta = "1.40.0"
2023
memchr = "2.7.4"
24+
once_cell = "1.19"
2125
proc-macro2 = "1.0.94"
2226
schemars = "0.8.21"
23-
serde = "1.0.215"
27+
serde = { version = "1.0.215", features = ["derive"] }
2428
serde_json = "1.0.132"
29+
serde_yaml = "0.9"
30+
thiserror = "1.0"
2531
toml = "0.8.19"
32+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
33+
yaml-rust2 = "0.10"
2634

2735
[workspace.dependencies.proc-macro-error2]
2836
version = "2.0.1"
2937
default-features = false
3038

31-
[workspace.dependencies.tests_macros]
32-
path = "./crates/tests_macros"
33-
3439
[workspace.dependencies.tracing]
3540
version = "0.1.40"
3641
features = ["std"]
@@ -42,15 +47,21 @@ version = "0.25.8"
4247
[workspace.dependencies.tree-sitter-qmd]
4348
path = "./crates/tree-sitter-qmd"
4449

45-
[workspace.dependencies.tree-sitter-sexpr]
46-
path = "./crates/tree-sitter-sexpr"
47-
4850
[workspace.dependencies.wasm-qmd-parser]
4951
path = "./crates/wasm-qmd-parser"
5052

5153
[workspace.dependencies.quarto-markdown-pandoc]
5254
path = "./crates/quarto-markdown-pandoc"
5355

56+
[workspace.dependencies.quarto-yaml]
57+
path = "./crates/quarto-yaml"
58+
59+
[workspace.dependencies.quarto-error-reporting]
60+
path = "./crates/quarto-error-reporting"
61+
62+
[workspace.dependencies.quarto-source-map]
63+
path = "./crates/quarto-source-map"
64+
5465

5566
[workspace.lints.clippy]
5667
assigning_clones = "warn"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[package]
2+
name = "quarto-error-reporting"
3+
version.workspace = true
4+
edition.workspace = true
5+
authors.workspace = true
6+
license.workspace = true
7+
repository.workspace = true
8+
description = "Error reporting and diagnostic messages for Quarto"
9+
10+
[dependencies]
11+
# Source location tracking
12+
quarto-source-map = { path = "../quarto-source-map" }
13+
14+
# Error reporting
15+
ariadne = { workspace = true }
16+
thiserror = { workspace = true }
17+
once_cell = { workspace = true }
18+
19+
# Serialization
20+
serde = { workspace = true }
21+
serde_json = { workspace = true }
22+
23+
[dev-dependencies]
24+
# No dev dependencies yet

0 commit comments

Comments
 (0)