Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a30e7c9
New parser. Nowhere near functional. Just prototyping.
tyler Dec 12, 2024
6eaca34
starting to wonder if this is a good idea
tyler Dec 13, 2024
2b59e00
Getting there. Correctly-ish identify HTML (and ignore it) and pull o…
tyler Dec 19, 2024
214080d
That's the easy tags out of the way
tyler Dec 19, 2024
5e9b3f7
All of the rest of the esi tags we currently support.
tyler Dec 19, 2024
b23d0e3
Integrate nom expression parser from @vagetman (thank you!) and do a …
tyler Dec 20, 2024
f216023
Convert new parser to use types understood by interpreter and impleme…
tyler Dec 21, 2024
fc2ff13
Merge nom-based parser from tyler/compiler_and_vm branch
vagetman Oct 30, 2025
c833efb
Replace XML and ESI parsers with unified nom-based parser implementation
vagetman Oct 31, 2025
f543dc4
Refactor function signatures to use lifetimes to suppress errors
vagetman Oct 31, 2025
9063da3
Remove quick-xml dependency and legacy XML parsing code in favor of n…
vagetman Oct 31, 2025
f8984df
Refactor ESI parser and related tests to improve handling of variable…
vagetman Oct 31, 2025
0f1145b
Refactor ESI parser to change `esi:otherwise` to a unit variant and u…
vagetman Oct 31, 2025
e50d2f7
Refactor ESI parser to change attempt_events from a single vector to …
vagetman Oct 31, 2025
be56b6d
Simplify `esi:assign` tags by removing alternative tag options
vagetman Oct 31, 2025
364a0c9
simplified parsers by only using `complete` combinators
vagetman Oct 31, 2025
48abd1b
adjust formatting with `rustfmt`
vagetman Oct 31, 2025
35f7314
Renamed and ported parse tests.
vagetman Oct 31, 2025
919f95c
Restore three-phase (concurrent) fragment fetching
vagetman Oct 31, 2025
2e3d5d6
Fix: Pass `is_escaped_content` parameter to fragment request functions
vagetman Nov 1, 2025
c38d6a0
Add support for process_fragment_response callback and enhance fragme…
vagetman Nov 1, 2025
56edfcc
Refactor clippy warnings and improve variable parsing in the parser m…
vagetman Nov 1, 2025
bc71664
Implement ESI expression enhancements and parser improvements
vagetman Nov 1, 2025
440af4d
Enhance fragment request handling and improve error management in pro…
vagetman Nov 1, 2025
f926da6
got rid of unnecessary `if` block
vagetman Nov 1, 2025
811bf70
Refactor ESI parser types and enhance tests for interpolation
vagetman Nov 1, 2025
cab4193
Refactor parser functions to improve clarity and consistency; rename …
vagetman Nov 1, 2025
b28ac0b
Refactor fetch_elements to `NomTag` -> `Tag` enum;
vagetman Nov 1, 2025
39499dc
Refactor ESI fragment handling: Re-Introduce Fragment struct and proc…
vagetman Nov 2, 2025
7f4a15b
Refactor ESI processing: improve handling of runtime elements
vagetman Nov 2, 2025
d69fa61
The `Processor` now owns the `EvalContext` (aka `ctx`)
vagetman Nov 2, 2025
6ff1f5c
Convert to streaming processing: dispatch→execute one at a time inste…
vagetman Nov 3, 2025
89c3930
Implement ESI Processor with streaming support for fragment requests …
vagetman Nov 3, 2025
94406c1
Refactor try/except handling in ESI processing: implement parallel di…
vagetman Nov 3, 2025
42b00c0
Refactor ESI include dispatching: streamline logic by consolidating r…
vagetman Nov 3, 2025
c4de44e
Enhance ESI document processing with streaming architecture
vagetman Nov 3, 2025
943436c
Refactor streaming parser: implement iteration limit and enhance EOF …
vagetman Nov 4, 2025
4cf4cd8
Add comprehensive parser tests for ESI tags
vagetman Nov 4, 2025
f10ef49
Add comprehensive tests for streaming parser behavior and incomplete …
vagetman Nov 5, 2025
8b770eb
Refactor parser to implement a loop strategy for handling incomplete …
vagetman Nov 6, 2025
c52fadd
Refactor parser tests to use Bytes for zero-copy parsing
vagetman Nov 6, 2025
e04c388
Refactor parser: Remove parser_str_backup.rs and update streaming_beh…
vagetman Nov 6, 2025
60979a4
Refactor parser: Update parse_interpolated_string to accept Bytes for…
vagetman Nov 6, 2025
bd67ac0
Refactor parser and functions to use Bytes for zero-copy handling, im…
vagetman Nov 6, 2025
abac73d
Refactor functions: Clean up formatting and improve readability in ht…
vagetman Nov 6, 2025
55f71a4
Refactor parser: Simplify content parsing in esi_assign_long, esi_exc…
vagetman Nov 6, 2025
a9052b4
Update previously disabled tests
vagetman Nov 11, 2025
c333b26
Restored more disabled tests
vagetman Nov 11, 2025
ccb5de2
Refactor parser: Replace custom parsers with nom's built-in functions…
vagetman Nov 11, 2025
e91575f
Refactor parser: Consolidate ESI tag handling into a unified dispatch…
vagetman Nov 13, 2025
2309321
Refactor parser: Enhance esi_vars_content and htmlstring functions fo…
vagetman Nov 13, 2025
e944b2c
Refactor parser: Rename functions for clarity and improve tag handlin…
vagetman Nov 13, 2025
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
198 changes: 91 additions & 107 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion esi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ repository = "https://github.com/fastly/esi"
readme = "./README.md"

[dependencies]
quick-xml = "0.38.0"
thiserror = "2.0.6"
fastly = "^0.11"
log = "^0.4"
regex = "1.11.1"
html-escape = "0.2.13"
nom = "7.1.3"
bytes = "1.5"

[dev-dependencies]
env_logger = "^0.11"
116 changes: 0 additions & 116 deletions esi/src/document.rs

This file was deleted.

5 changes: 3 additions & 2 deletions esi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ use fastly::http::request::SendError;
#[allow(clippy::large_enum_variant)]
pub enum ExecutionError {
/// Invalid XML was encountered during parsing.
#[error("xml parsing error: {0}")]
XMLError(#[from] quick_xml::Error),
/// (Legacy - not used by nom parser)
// #[error("xml parsing error: {0}")]
// XMLError(#[from] quick_xml::Error),

/// The ESI document contains a tag with a missing parameter.
#[error("tag `{0}` is missing required parameter `{1}`")]
Expand Down
Loading
Loading