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
A compatibility test against the ocaml-mustache v2.0.0 API #64
A compatibility test against the ocaml-mustache v2.0.0 API #64
Conversation
a7b6d39
to
2628157
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the attention paid to backwards compatibility, but I have to wonder if it's justified here. This library has exactly 2 dependants on opam. To me this means that it would be easier to just test & fix these users and just forget about the old interface.
In any case, I don't think the changes here will slow down the development of the library. So I do think it's fine to merge.
|
||
# Parsed template | ||
|
||
## parsed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this file being used anywhere in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dune
compares this output with the output generated by running user_program.exe
and fails if they differ.
This test is designed to get a sense of the backward-compatibility impact of changes to the ocaml-mustache library. mustache_v200.mli is exactly a copy of the Mustache interface as it existed in the version v2.0.0, and it should not change. mustache_v200.ml is a reimplementation of this interface using the current ocaml-mustache library. If the library changes, this reimplementation will have to be fixed as well; the invasiveness of this fix can be used to estimate the invasiveness of the change for end-users. user_program.ml is written against this interface, and we check that it keeps working. v2.0.0 was chosen because it does not contain an explicit AST definition or "fold" function -- whose compatibility breaks for basically any new language feature or representation change (for example when adding locations in the AST).
2628157
to
0066e66
Compare
Regarding backwards-compatibility:
|
This test is designed to get a sense of the backward-compatibility
impact of changes to the ocaml-mustache library.
mustache_v200.mli is exactly a copy of the Mustache interface as it
existed in the version v2.0.0, and it should not change.
mustache_v200.ml is a reimplementation of this interface using the
current ocaml-mustache library. If the library changes, this
reimplementation will have to be fixed as well; the invasiveness of
this fix can be used to estimate the invasiveness of the change for
end-users.
v2.0.0 was chosen because it does not contain an explicit AST
definition or "fold" function -- whose compatibility breaks for
basically any new language feature or representation
change (for example when adding locations in the AST).