Skip to content
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

The spec doesn't build in Hugo v0.114.1 #1586

Closed
akirk opened this issue Jun 27, 2023 · 5 comments
Closed

The spec doesn't build in Hugo v0.114.1 #1586

akirk opened this issue Jun 27, 2023 · 5 comments
Labels
A-Tools Related to the process and tools for building the spec

Comments

@akirk
Copy link

akirk commented Jun 27, 2023

Link to problem area: -

Issue
The instructions for building the spec fail with a modern hugo version. For example, Homebrew on macOS installs hugo v0.114.1+extended where building fails with this error message:

Error: error building site: failed to render shortcode: "matrix-spec/content/client-server-api/_index.md:2488:1": failed to render shortcode "http-api": failed to process shortcode: "matrix-spec/layouts/shortcodes/http-api.html:26:3": execute of template failed: template: shortcodes/http-api.html:26:3: executing "shortcodes/http-api.html" at <partial "openapi/render-api" (dict "api_data" $api_data "base_url" $base_url "path" $path)>: error calling partial: "matrix-spec/layouts/partials/openapi/render-api.html:36:11": execute of template failed: template: partials/openapi/render-api.html:36:11: executing "partials/openapi/render-api.html" at <partial "openapi/render-operation" $operation_params>: error calling partial: execute of template failed: template: partials/openapi/render-operation.html:67:3: executing "partials/openapi/render-operation.html" at <partial "openapi/render-request" (dict "parameters" $operation_data.parameters "request_body" $operation_data.requestBody "path" $path "anchor_base" $anchor)>: error calling partial: "matrix-spec/layouts/partials/openapi/render-request.html:45:26": execute of template failed: template: partials/openapi/render-request.html:45:26: executing "partials/openapi/render-request.html" at <partial "json-schema/resolve-refs" (dict "schema" $json_body.schema "path" $path)>: error calling partial: "matrix-spec/layouts/partials/json-schema/resolve-refs.html:43:28": execute of template failed: template: partials/json-schema/resolve-refs.html:43:28: executing "partials/json-schema/resolve-refs.html" at <partial "json-schema/resolve-refs" (dict "schema" $value "path" $path)>: error calling partial: "matrix-spec/layouts/partials/json-schema/resolve-refs.html:43:28": execute of template failed: template: partials/json-schema/resolve-refs.html:43:28: executing "partials/json-schema/resolve-refs.html" at <partial "json-schema/resolve-refs" (dict "schema" $value "path" $path)>: error calling partial: "matrix-spec/layouts/partials/json-schema/resolve-refs.html:43:28": execute of template failed: template: partials/json-schema/resolve-refs.html:43:28: executing "partials/json-schema/resolve-refs.html" at <partial "json-schema/resolve-refs" (dict "schema" $value "path" $path)>: error calling partial: "matrix-spec/layouts/partials/json-schema/resolve-refs.html:58:43": execute of template failed: template: partials/json-schema/resolve-refs.html:58:43: executing "partials/json-schema/resolve-refs.html" at <append $resolved>: error calling append: reflect: call of reflect.Value.Type on zero Value

I tested also Hugo 0.113.0 and it successfully builds there, so something specifically in the v0.114.0 release broke it (and v0.114.1 is still broken).

Expected behaviour
The spec should build without warning in recent Hugo versions. Likely a number of other problems also need to be resolved, for example #1544.

@akirk akirk added the spec-bug Something which is in the spec, but is wrong label Jun 27, 2023
@richvdh richvdh added A-Tools Related to the process and tools for building the spec and removed spec-bug Something which is in the spec, but is wrong labels Jun 27, 2023
@richvdh
Copy link
Member

richvdh commented Jun 27, 2023

This appears to be due to the [null, "m.space"] in https://github.com/matrix-org/matrix-spec/blob/v1.7/data/api/server-server/public_rooms.yaml, which seems to be upsetting the append in https://github.com/matrix-org/matrix-spec/blob/v1.7/layouts/partials/json-schema/resolve-refs.html#L58.

I suspect it has been introduced by gohugoio/hugo#11104 which means that append now does a reflect.ValueOf on its inputs.

@richvdh
Copy link
Member

richvdh commented Jun 27, 2023

Raised upstream as gohugoio/hugo#11180

@richvdh
Copy link
Member

richvdh commented Jun 28, 2023

... and apparently already fixed upstream

@richvdh
Copy link
Member

richvdh commented Jul 3, 2023

Hugo v0.115 is now released. Could somebody check if the spec now builds ok?

@richvdh
Copy link
Member

richvdh commented Jul 4, 2023

Tested with v0.115.1 - seems fine

@richvdh richvdh closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Tools Related to the process and tools for building the spec
Projects
None yet
Development

No branches or pull requests

2 participants