google / google/closure-templates
Invalid multimap flag entry. No '=' found: io.noticeable.newspage.soy.functions.ContainsFunction
- Dominant language
- Java
- Stars
- 700
- Forks
- 199
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 26
Description
Using the latest open source version [2023-07-19](https://github.com/google/closure-templates/releases/tag/release-2023-07-19) that include security fixes, compiling a soy template breaks with this error message:
```
Invalid multimap flag entry. No '=' found: io.noticeable.newspage.soy.functions.ContainsFunction,io.noticeable.newspage.soy.functions.DefaultAvatarFunction,io.noticeable.newspage.soy.functions.ExcerptFunction,io.noticeable.newspage.soy.functions.GetFunction,io.noticeable.newspage.soy.functions.HtmlFunction,io.noticeable.newspage.soy.functions.Iso8601Function,io.noticeable.newspage.soy.functions.LabelsFunction,io.noticeable.newspage.soy.functions.LabelClustersFunction,io.noticeable.newspage.soy.functions.MarkdownFunction,io.noticeable.newspage.soy.functions.NullOrBlankFunction,io.noticeable.newspage.soy.functions.PhraseFunction,io.noticeable.newspage.soy.functions.ReplaceUrlPlaceholdersFunction,io.noticeable.newspage.soy.functions.Rfc822Function,io.noticeable.newspage.soy.functions.TimestampFunction,io.noticeable.newspage.soy.functions.UniqueJoinFunction,io.noticeable.newspage.soy.functions.UrlFunction
```
Here is snippet of a soy template that shows how the contains custom function is used:
```
{template Publication}
{@inject baseUrl: trusted_resource_uri}
{@inject assetsUrl: trusted_resource_uri}
{@inject newspage: map}
{@inject project: map}
{@inject queryParameters: map>}
{@inject requestUri: string}
{@param publication: map}
{let $labels: labels($project, $publication) /}
{call Layout}
{param canonicalUrl kind="text"}{nullOrBlank($publication['seo']['canonicalUrl']) ? '' : $publication['seo']['canonicalUrl']}{/param}
{param metaDescription kind="text"}{contains($publication, 'seo', 'meta', 'description') ? get($publication, 'seo', 'meta', 'description') : excerpt($publication)}{/param}
...
{/template}
```
I guess a breaking change has been introduced since the last release but I cannot understand what it is based on the error message. Any idea?
Contributor guide
Research direction
Start by reproducing the compilation failure from the 2023-07-19 release using the shown Soy template and custom function classes. Inspect how those functions are registered and how the multimap flag is parsed; done means the template compiles without the “No '=' found” error or the issue clearly documents the required configuration change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100