Upgrade jmustache to 1.16#18314
Conversation
|
thanks for the PR but looks like it will result in lots of changes in the output: https://productionresultssa1.blob.core.windows.net/actions-results/287acba6-96f0-4a95-ad6c-dfb52d7049f8/workflow-job-run-c90dc8a9-fea7-5883-83b9-154993c904f5/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-04-07T09%3A36%3A35Z&sig=RJEEGjIGsHWy%2FuUJJ%2BLr707Hd9KggLyjpz%2FZ9T9JuMs%3D&sp=r&spr=https&sr=b&st=2024-04-07T09%3A26%3A30Z&sv=2021-12-02 we will need to investigate further and update the templates if needed to address the issue due to the upgrade. |
I'll try to run it locally as per docs. Very likely whitespace changes. |
|
couldn't get local build working as well as build in docker, will try some other day. Closing this PR for now. |
|
Hi, I wanted to contribute a new sdk and I'd like to use the parent feature of mustache, which is available in 1.16, so I came across this PR. From what I observe, the changes are whitespace changes. Many of them (if not all of them) are caused by a partial that does not have a trailing newline but was generated with a newline before: For example, take the Before: <?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PathApi(After: <?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\PathApi(The relevant template: <?php
require_once(__DIR__ . '/vendor/autoload.php');
{{> php_doc_auth_partial}}
$apiInstance = new {{invokerPackage}}\Api\{{classname}}(Where the {{#hasAuthMethods}}{{#authMethods}}
{{! Removed for simplicity }}
{{/authMethods}}{{/hasAuthMethods}}{{! There's a trailing new line after this }}
So in theory, I think the new behavior is correct (though I'm not sure why it behaved as such before), but this will require adding newlines in each of the partials. |
|
An example to demonstrate the JMustache 1.15 behavior. The given test will fail: master...peter-jerry-ye:openapi-generator:mustache-partial-issue |
|
@peter-jerry-ye I'm also interested in getting jmustache upgraded to 1.16 to take advantage of parents and inheritance. Maybe I can try make a new PR since gemyago abandoned this PR UPDATE: Made a new PR at #19575 |
Includes upgrade to jmustache to 1.16