这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@maxmwang
Copy link
Contributor

@maxmwang maxmwang commented Aug 6, 2025

Implements interval tree and refactors overrides to use this new data structure. The chosen interval tree design is based off of this description.

Testing

Added unit tests for invalid inputs and common happy path cases.

Testing story can possibly be improved with more edge case testing.

@liam923
Copy link
Contributor

liam923 commented Aug 7, 2025

I'll hit merge once CI passes. Poke me if I forget (I probably will)

@liam923 liam923 merged commit e091516 into oxcaml:ppx-improvements Aug 7, 2025
1 check passed
liam923 added a commit that referenced this pull request Aug 15, 2025
* merlin document support for PPXs (#167)

* initial working with tests

* temp update

* temp

* major refactors, add support for .mli files

* refactoring and cleanup

* move all logic into override_document.ml; cleanup code; add logging

* add many more tests; handle edge cases

* revert std.ml changes

* improve comments

* update more comments

* suggested changes

* test nested ppx

* document payload test

* some more tests

* resolve final comments

* add test on floating attribute

* add test for attribute in an extension's payload

* Fix function syntax

* merlin overrides: merlin locate support for PPXs (#171)

* merlin document support for PPXs (#167)

* initial working with tests

* temp update

* temp

* major refactors, add support for .mli files

* refactoring and cleanup

* move all logic into override_document.ml; cleanup code; add logging

* add many more tests; handle edge cases

* revert std.ml changes

* improve comments

* update more comments

* suggested changes

* test nested ppx

* document payload test

* some more tests

* resolve final comments

* add test on floating attribute

* add test for attribute in an extension's payload

* Fix function syntax

* working parsing of new merlin.document structure

* fix document tests with new merlin.document structure

* replicate merlin.document tests for merlin.locate

* generalize comments, code for all overrides

* delete duplicate files from merge conflict

* add test overriding locate of a non-PPX

* add test on overriding default behavior of document

* format

* combine document and locate tests into single file

* adjust for new attribute structure

* update comment documenting expected attribute structure

* fix typo

* remove named parameter

* merlin locate outputs absolute paths using source_root

---------

Co-authored-by: Liam Stevenson <lstevenson@janestreet.com>

* merlin overrides use interval tree instead of list (#173)

* interval tree interface

* interval tree implementation and basic test

* use array for construction, add more tests

* add and update comments

* fix error messages, validate inputs

* use list instead of array, add tests, add comments

* integrate into overrides.ml

* add test for empty tree

* resolve requested changes

* add test for zero-width interval

* undo test reformat

* update outdated comment

* update another oudated comment

* update comment

* Cache overrides interval trees using Phase_cache (#176)

* implementation but failing tests

* working overrides caching with tests

* add USE_PPX_CACHE, add all cache entries to tests

* update comments

* use Option.map

* move comment

* fix overrides caching mechanism, functorize caches, add cache invalidation test

* add comments, rename

* cleanup test output, and resolve other comments

* remove unnecessary sed commands from tests

* add commentsg

---------

Co-authored-by: Max Wang <orangemax888@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants